repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
polyaxon/polyaxon
polyaxon/streams/consumers/consumers.py
Consumer.setup_exchange
def setup_exchange(self, exchange_name): """Setup the exchange on RabbitMQ by invoking the Exchange.Declare RPC command. When it is complete, the on_exchange_declareok method will be invoked by pika. :param str|unicode exchange_name: The name of the exchange to declare """ ...
python
def setup_exchange(self, exchange_name): """Setup the exchange on RabbitMQ by invoking the Exchange.Declare RPC command. When it is complete, the on_exchange_declareok method will be invoked by pika. :param str|unicode exchange_name: The name of the exchange to declare """ ...
[ "def", "setup_exchange", "(", "self", ",", "exchange_name", ")", ":", "_logger", ".", "debug", "(", "'Declaring exchange %s'", ",", "exchange_name", ")", "self", ".", "_channel", ".", "exchange_declare", "(", "self", ".", "on_exchange_declareok", ",", "exchange_na...
Setup the exchange on RabbitMQ by invoking the Exchange.Declare RPC command. When it is complete, the on_exchange_declareok method will be invoked by pika. :param str|unicode exchange_name: The name of the exchange to declare
[ "Setup", "the", "exchange", "on", "RabbitMQ", "by", "invoking", "the", "Exchange", ".", "Declare", "RPC", "command", ".", "When", "it", "is", "complete", "the", "on_exchange_declareok", "method", "will", "be", "invoked", "by", "pika", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/streams/consumers/consumers.py#L134-L146
train
Declare an exchange on RabbitMQ by invoking the Exchange. Declare RPC command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/streams/consumers/consumers.py
Consumer.setup_queue
def setup_queue(self, queue_name): """Setup the queue on RabbitMQ by invoking the Queue.Declare RPC command. When it is complete, the on_queue_declareok method will be invoked by pika. :param str|unicode queue_name: The name of the queue to declare. """ _logger.debug('De...
python
def setup_queue(self, queue_name): """Setup the queue on RabbitMQ by invoking the Queue.Declare RPC command. When it is complete, the on_queue_declareok method will be invoked by pika. :param str|unicode queue_name: The name of the queue to declare. """ _logger.debug('De...
[ "def", "setup_queue", "(", "self", ",", "queue_name", ")", ":", "_logger", ".", "debug", "(", "'Declaring queue %s'", ",", "queue_name", ")", "self", ".", "_channel", ".", "queue_declare", "(", "self", ".", "on_queue_declareok", ",", "queue_name", ")" ]
Setup the queue on RabbitMQ by invoking the Queue.Declare RPC command. When it is complete, the on_queue_declareok method will be invoked by pika. :param str|unicode queue_name: The name of the queue to declare.
[ "Setup", "the", "queue", "on", "RabbitMQ", "by", "invoking", "the", "Queue", ".", "Declare", "RPC", "command", ".", "When", "it", "is", "complete", "the", "on_queue_declareok", "method", "will", "be", "invoked", "by", "pika", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/streams/consumers/consumers.py#L157-L165
train
Declare a queue on RabbitMQ by invoking the Queue. Declare RPC command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/streams/consumers/consumers.py
Consumer.on_queue_declareok
def on_queue_declareok(self, method_frame): """Method invoked by pika when the Queue.Declare RPC call made in setup_queue has completed. In this method we will bind the queue and exchange together with the routing key by issuing the Queue.Bind RPC command. When this command is complete, ...
python
def on_queue_declareok(self, method_frame): """Method invoked by pika when the Queue.Declare RPC call made in setup_queue has completed. In this method we will bind the queue and exchange together with the routing key by issuing the Queue.Bind RPC command. When this command is complete, ...
[ "def", "on_queue_declareok", "(", "self", ",", "method_frame", ")", ":", "_logger", ".", "info", "(", "'Binding %s to %s with %s'", ",", "self", ".", "EXCHANGE", ",", "self", ".", "_queue", ",", "self", ".", "_routing_key", ")", "self", ".", "_channel", ".",...
Method invoked by pika when the Queue.Declare RPC call made in setup_queue has completed. In this method we will bind the queue and exchange together with the routing key by issuing the Queue.Bind RPC command. When this command is complete, the on_bindok method will be invoked by pika. ...
[ "Method", "invoked", "by", "pika", "when", "the", "Queue", ".", "Declare", "RPC", "call", "made", "in", "setup_queue", "has", "completed", ".", "In", "this", "method", "we", "will", "bind", "the", "queue", "and", "exchange", "together", "with", "the", "rou...
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/streams/consumers/consumers.py#L167-L179
train
Invoked by pika when the Queue. Declare RPC call made by pika to bind the queue to the exchange together with the routing key.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/streams/consumers/consumers.py
Consumer.on_consumer_cancelled
def on_consumer_cancelled(self, method_frame): """Invoked by pika when RabbitMQ sends a Basic.Cancel for a consumer receiving messages. :param pika.frame.Method method_frame: The Basic.Cancel frame """ _logger.info('Consumer was cancelled remotely, shutting down: %r', method_fra...
python
def on_consumer_cancelled(self, method_frame): """Invoked by pika when RabbitMQ sends a Basic.Cancel for a consumer receiving messages. :param pika.frame.Method method_frame: The Basic.Cancel frame """ _logger.info('Consumer was cancelled remotely, shutting down: %r', method_fra...
[ "def", "on_consumer_cancelled", "(", "self", ",", "method_frame", ")", ":", "_logger", ".", "info", "(", "'Consumer was cancelled remotely, shutting down: %r'", ",", "method_frame", ")", "if", "self", ".", "_channel", ":", "self", ".", "_channel", ".", "close", "(...
Invoked by pika when RabbitMQ sends a Basic.Cancel for a consumer receiving messages. :param pika.frame.Method method_frame: The Basic.Cancel frame
[ "Invoked", "by", "pika", "when", "RabbitMQ", "sends", "a", "Basic", ".", "Cancel", "for", "a", "consumer", "receiving", "messages", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/streams/consumers/consumers.py#L189-L197
train
Invoked by pika when a Basic. Cancel frame is received.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/streams/consumers/consumers.py
Consumer.acknowledge_message
def acknowledge_message(self, delivery_tag): """Acknowledge the message delivery from RabbitMQ by sending a Basic.Ack RPC method for the delivery tag. :param int delivery_tag: The delivery tag from the Basic.Deliver frame """ _logger.debug('Acknowledging message %s', delivery_ta...
python
def acknowledge_message(self, delivery_tag): """Acknowledge the message delivery from RabbitMQ by sending a Basic.Ack RPC method for the delivery tag. :param int delivery_tag: The delivery tag from the Basic.Deliver frame """ _logger.debug('Acknowledging message %s', delivery_ta...
[ "def", "acknowledge_message", "(", "self", ",", "delivery_tag", ")", ":", "_logger", ".", "debug", "(", "'Acknowledging message %s'", ",", "delivery_tag", ")", "self", ".", "_channel", ".", "basic_ack", "(", "delivery_tag", ")" ]
Acknowledge the message delivery from RabbitMQ by sending a Basic.Ack RPC method for the delivery tag. :param int delivery_tag: The delivery tag from the Basic.Deliver frame
[ "Acknowledge", "the", "message", "delivery", "from", "RabbitMQ", "by", "sending", "a", "Basic", ".", "Ack", "RPC", "method", "for", "the", "delivery", "tag", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/streams/consumers/consumers.py#L199-L206
train
Acknowledge the delivery from RabbitMQ by sending Basic. Ack RPC method for the delivery tag.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/streams/consumers/consumers.py
Consumer.on_message
def on_message(self, unused_channel, basic_deliver, properties, body): """Invoked by pika when a message is delivered from RabbitMQ. The channel is passed for your convenience. The basic_deliver object that is passed in carries the exchange, routing key, delivery tag and a redelivered fl...
python
def on_message(self, unused_channel, basic_deliver, properties, body): """Invoked by pika when a message is delivered from RabbitMQ. The channel is passed for your convenience. The basic_deliver object that is passed in carries the exchange, routing key, delivery tag and a redelivered fl...
[ "def", "on_message", "(", "self", ",", "unused_channel", ",", "basic_deliver", ",", "properties", ",", "body", ")", ":", "_logger", ".", "debug", "(", "'Received message # %s from %s: %s'", ",", "basic_deliver", ".", "delivery_tag", ",", "properties", ".", "app_id...
Invoked by pika when a message is delivered from RabbitMQ. The channel is passed for your convenience. The basic_deliver object that is passed in carries the exchange, routing key, delivery tag and a redelivered flag for the message. The properties passed in is an instance of BasicProper...
[ "Invoked", "by", "pika", "when", "a", "message", "is", "delivered", "from", "RabbitMQ", ".", "The", "channel", "is", "passed", "for", "your", "convenience", ".", "The", "basic_deliver", "object", "that", "is", "passed", "in", "carries", "the", "exchange", "r...
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/streams/consumers/consumers.py#L208-L227
train
Invoked by pika when a message is delivered from RabbitMQ.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/streams/consumers/consumers.py
Consumer.stop_consuming
def stop_consuming(self): """Tell RabbitMQ that you would like to stop consuming by sending the Basic.Cancel RPC command. """ if self._channel: _logger.debug('Sending a Basic.Cancel RPC command to RabbitMQ') self._channel.basic_cancel(self.on_cancelok, self._consu...
python
def stop_consuming(self): """Tell RabbitMQ that you would like to stop consuming by sending the Basic.Cancel RPC command. """ if self._channel: _logger.debug('Sending a Basic.Cancel RPC command to RabbitMQ') self._channel.basic_cancel(self.on_cancelok, self._consu...
[ "def", "stop_consuming", "(", "self", ")", ":", "if", "self", ".", "_channel", ":", "_logger", ".", "debug", "(", "'Sending a Basic.Cancel RPC command to RabbitMQ'", ")", "self", ".", "_channel", ".", "basic_cancel", "(", "self", ".", "on_cancelok", ",", "self",...
Tell RabbitMQ that you would like to stop consuming by sending the Basic.Cancel RPC command.
[ "Tell", "RabbitMQ", "that", "you", "would", "like", "to", "stop", "consuming", "by", "sending", "the", "Basic", ".", "Cancel", "RPC", "command", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/streams/consumers/consumers.py#L240-L246
train
Tell RabbitMQ that you would like to stop consuming.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/streams/consumers/consumers.py
Consumer.open_channel
def open_channel(self): """Open a new channel with RabbitMQ by issuing the Channel.Open RPC command. When RabbitMQ responds that the channel is open, the on_channel_open callback will be invoked by pika. """ _logger.info('Creating a new channel') self._connection.channel(...
python
def open_channel(self): """Open a new channel with RabbitMQ by issuing the Channel.Open RPC command. When RabbitMQ responds that the channel is open, the on_channel_open callback will be invoked by pika. """ _logger.info('Creating a new channel') self._connection.channel(...
[ "def", "open_channel", "(", "self", ")", ":", "_logger", ".", "info", "(", "'Creating a new channel'", ")", "self", ".", "_connection", ".", "channel", "(", "on_open_callback", "=", "self", ".", "on_channel_open", ")" ]
Open a new channel with RabbitMQ by issuing the Channel.Open RPC command. When RabbitMQ responds that the channel is open, the on_channel_open callback will be invoked by pika.
[ "Open", "a", "new", "channel", "with", "RabbitMQ", "by", "issuing", "the", "Channel", ".", "Open", "RPC", "command", ".", "When", "RabbitMQ", "responds", "that", "the", "channel", "is", "open", "the", "on_channel_open", "callback", "will", "be", "invoked", "...
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/streams/consumers/consumers.py#L280-L286
train
Open a new channel with RabbitMQ by issuing the Channel. Open RPC command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/streams/consumers/consumers.py
Consumer.run
def run(self): """Run the example consumer by connecting to RabbitMQ and then starting the IOLoop to block and allow the SelectConnection to operate. """ self._connection = self.connect() self._connection.ioloop.start()
python
def run(self): """Run the example consumer by connecting to RabbitMQ and then starting the IOLoop to block and allow the SelectConnection to operate. """ self._connection = self.connect() self._connection.ioloop.start()
[ "def", "run", "(", "self", ")", ":", "self", ".", "_connection", "=", "self", ".", "connect", "(", ")", "self", ".", "_connection", ".", "ioloop", ".", "start", "(", ")" ]
Run the example consumer by connecting to RabbitMQ and then starting the IOLoop to block and allow the SelectConnection to operate.
[ "Run", "the", "example", "consumer", "by", "connecting", "to", "RabbitMQ", "and", "then", "starting", "the", "IOLoop", "to", "block", "and", "allow", "the", "SelectConnection", "to", "operate", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/streams/consumers/consumers.py#L288-L293
train
Run the example consumer by connecting to RabbitMQ and then starting the IOLoop to block and allow the SelectConnection to operate.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/streams/consumers/consumers.py
Consumer.stop
def stop(self): """Cleanly shutdown the connection to RabbitMQ by stopping the consumer with RabbitMQ. When RabbitMQ confirms the cancellation, on_cancelok will be invoked by pika, which will then closing the channel and connection. The IOLoop is started again because this method is invo...
python
def stop(self): """Cleanly shutdown the connection to RabbitMQ by stopping the consumer with RabbitMQ. When RabbitMQ confirms the cancellation, on_cancelok will be invoked by pika, which will then closing the channel and connection. The IOLoop is started again because this method is invo...
[ "def", "stop", "(", "self", ")", ":", "_logger", ".", "debug", "(", "'Stopping'", ")", "self", ".", "_closing", "=", "True", "self", ".", "stop_consuming", "(", ")", "self", ".", "_connection", ".", "ioloop", ".", "start", "(", ")", "_logger", ".", "...
Cleanly shutdown the connection to RabbitMQ by stopping the consumer with RabbitMQ. When RabbitMQ confirms the cancellation, on_cancelok will be invoked by pika, which will then closing the channel and connection. The IOLoop is started again because this method is invoked when CTRL-C is ...
[ "Cleanly", "shutdown", "the", "connection", "to", "RabbitMQ", "by", "stopping", "the", "consumer", "with", "RabbitMQ", ".", "When", "RabbitMQ", "confirms", "the", "cancellation", "on_cancelok", "will", "be", "invoked", "by", "pika", "which", "will", "then", "clo...
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/streams/consumers/consumers.py#L295-L309
train
Stop the connection to RabbitMQ by stopping the consumer and closing the connection.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/action_manager/utils/email.py
render_mail_template
def render_mail_template(subject_template, body_template, context): """ Renders both the subject and body templates in the given context. Returns a tuple (subject, body) of the result. """ try: subject = strip_spaces(render_to_string(subject_template, context)) body = render_to_strin...
python
def render_mail_template(subject_template, body_template, context): """ Renders both the subject and body templates in the given context. Returns a tuple (subject, body) of the result. """ try: subject = strip_spaces(render_to_string(subject_template, context)) body = render_to_strin...
[ "def", "render_mail_template", "(", "subject_template", ",", "body_template", ",", "context", ")", ":", "try", ":", "subject", "=", "strip_spaces", "(", "render_to_string", "(", "subject_template", ",", "context", ")", ")", "body", "=", "render_to_string", "(", ...
Renders both the subject and body templates in the given context. Returns a tuple (subject, body) of the result.
[ "Renders", "both", "the", "subject", "and", "body", "templates", "in", "the", "given", "context", ".", "Returns", "a", "tuple", "(", "subject", "body", ")", "of", "the", "result", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/action_manager/utils/email.py#L9-L20
train
Renders both the subject and body templates in the given context.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/action_manager/utils/email.py
send_mass_template_mail
def send_mass_template_mail(subject_template, body_template, recipients, context=None): """ Renders an email subject and body using the given templates and context, then sends it to the given recipients list. The emails are send one-by-one. """ if context: subject, body = render_mail_te...
python
def send_mass_template_mail(subject_template, body_template, recipients, context=None): """ Renders an email subject and body using the given templates and context, then sends it to the given recipients list. The emails are send one-by-one. """ if context: subject, body = render_mail_te...
[ "def", "send_mass_template_mail", "(", "subject_template", ",", "body_template", ",", "recipients", ",", "context", "=", "None", ")", ":", "if", "context", ":", "subject", ",", "body", "=", "render_mail_template", "(", "subject_template", ",", "body_template", ","...
Renders an email subject and body using the given templates and context, then sends it to the given recipients list. The emails are send one-by-one.
[ "Renders", "an", "email", "subject", "and", "body", "using", "the", "given", "templates", "and", "context", "then", "sends", "it", "to", "the", "given", "recipients", "list", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/action_manager/utils/email.py#L23-L37
train
Sends an email using the given templates and context.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/action_manager/utils/email.py
send_mass_user_template_mail
def send_mass_user_template_mail(subject_template, body_template, users, context): """ Similar to `send_mass_template_mail` this function renders the given templates into email subjects and bodies. The emails are send one-by-one. """ message_tuples = [] for user in users: context['u...
python
def send_mass_user_template_mail(subject_template, body_template, users, context): """ Similar to `send_mass_template_mail` this function renders the given templates into email subjects and bodies. The emails are send one-by-one. """ message_tuples = [] for user in users: context['u...
[ "def", "send_mass_user_template_mail", "(", "subject_template", ",", "body_template", ",", "users", ",", "context", ")", ":", "message_tuples", "=", "[", "]", "for", "user", "in", "users", ":", "context", "[", "'user'", "]", "=", "user", "subject", ",", "bod...
Similar to `send_mass_template_mail` this function renders the given templates into email subjects and bodies. The emails are send one-by-one.
[ "Similar", "to", "send_mass_template_mail", "this", "function", "renders", "the", "given", "templates", "into", "email", "subjects", "and", "bodies", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/action_manager/utils/email.py#L40-L55
train
This function renders the given templates into email subjects and bodies.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/libs/repos/git/__init__.py
checkout_commit
def checkout_commit(repo_path: str, commit: Any = None) -> None: # pylint:disable=redefined-outer-name """Checkout to a specific commit. If commit is None then checkout to master. """ commit = commit or 'master' run_command(cmd='git checkout {}'.format(commit), data=None, locat...
python
def checkout_commit(repo_path: str, commit: Any = None) -> None: # pylint:disable=redefined-outer-name """Checkout to a specific commit. If commit is None then checkout to master. """ commit = commit or 'master' run_command(cmd='git checkout {}'.format(commit), data=None, locat...
[ "def", "checkout_commit", "(", "repo_path", ":", "str", ",", "commit", ":", "Any", "=", "None", ")", "->", "None", ":", "# pylint:disable=redefined-outer-name", "commit", "=", "commit", "or", "'master'", "run_command", "(", "cmd", "=", "'git checkout {}'", ".", ...
Checkout to a specific commit. If commit is None then checkout to master.
[ "Checkout", "to", "a", "specific", "commit", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/libs/repos/git/__init__.py#L120-L127
train
Checkout to a specific commit.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/libs/archive.py
create_tarfile
def create_tarfile(files: List[str], tar_path: str) -> None: """Create a tar file based on the list of files passed""" with tarfile.open(tar_path, "w:gz") as tar: for f in files: tar.add(f)
python
def create_tarfile(files: List[str], tar_path: str) -> None: """Create a tar file based on the list of files passed""" with tarfile.open(tar_path, "w:gz") as tar: for f in files: tar.add(f)
[ "def", "create_tarfile", "(", "files", ":", "List", "[", "str", "]", ",", "tar_path", ":", "str", ")", "->", "None", ":", "with", "tarfile", ".", "open", "(", "tar_path", ",", "\"w:gz\"", ")", "as", "tar", ":", "for", "f", "in", "files", ":", "tar"...
Create a tar file based on the list of files passed
[ "Create", "a", "tar", "file", "based", "on", "the", "list", "of", "files", "passed" ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/libs/archive.py#L16-L20
train
Create a tar file based on the list of files passed
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/checks/rabbitmq.py
RabbitMQCheck.check
def check() -> Result: """Open and close the broker channel.""" try: # Context to release connection with Connection(conf.get('CELERY_BROKER_URL')) as conn: conn.connect() except ConnectionRefusedError: return Result(message='Service unable to ...
python
def check() -> Result: """Open and close the broker channel.""" try: # Context to release connection with Connection(conf.get('CELERY_BROKER_URL')) as conn: conn.connect() except ConnectionRefusedError: return Result(message='Service unable to ...
[ "def", "check", "(", ")", "->", "Result", ":", "try", ":", "# Context to release connection", "with", "Connection", "(", "conf", ".", "get", "(", "'CELERY_BROKER_URL'", ")", ")", "as", "conn", ":", "conn", ".", "connect", "(", ")", "except", "ConnectionRefus...
Open and close the broker channel.
[ "Open", "and", "close", "the", "broker", "channel", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/checks/rabbitmq.py#L19-L39
train
Open and close the broker channel.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/hpsearch/search_managers/grid.py
GridSearchManager.get_suggestions
def get_suggestions(self, iteration_config=None): """Return a list of suggestions based on grid search. Params: matrix: `dict` representing the {hyperparam: hyperparam matrix config}. n_suggestions: number of suggestions to make. """ matrix = self.hptuning_config...
python
def get_suggestions(self, iteration_config=None): """Return a list of suggestions based on grid search. Params: matrix: `dict` representing the {hyperparam: hyperparam matrix config}. n_suggestions: number of suggestions to make. """ matrix = self.hptuning_config...
[ "def", "get_suggestions", "(", "self", ",", "iteration_config", "=", "None", ")", ":", "matrix", "=", "self", ".", "hptuning_config", ".", "matrix", "suggestions", "=", "[", "]", "keys", "=", "list", "(", "matrix", ".", "keys", "(", ")", ")", "values", ...
Return a list of suggestions based on grid search. Params: matrix: `dict` representing the {hyperparam: hyperparam matrix config}. n_suggestions: number of suggestions to make.
[ "Return", "a", "list", "of", "suggestions", "based", "on", "grid", "search", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/hpsearch/search_managers/grid.py#L12-L31
train
Returns a list of suggestions based on grid search.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/hpsearch/search_managers/bayesian_optimization/optimizer.py
BOOptimizer._maximize
def _maximize(self): """ Find argmax of the acquisition function.""" if not self.space.is_observations_valid(): return None y_max = self.space.y.max() self.utility_function.gaussian_process.fit(self.space.x, self.space.y) return self.utility_function.max_compute(y_max...
python
def _maximize(self): """ Find argmax of the acquisition function.""" if not self.space.is_observations_valid(): return None y_max = self.space.y.max() self.utility_function.gaussian_process.fit(self.space.x, self.space.y) return self.utility_function.max_compute(y_max...
[ "def", "_maximize", "(", "self", ")", ":", "if", "not", "self", ".", "space", ".", "is_observations_valid", "(", ")", ":", "return", "None", "y_max", "=", "self", ".", "space", ".", "y", ".", "max", "(", ")", "self", ".", "utility_function", ".", "ga...
Find argmax of the acquisition function.
[ "Find", "argmax", "of", "the", "acquisition", "function", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/hpsearch/search_managers/bayesian_optimization/optimizer.py#L16-L25
train
Find the argmax of the acquisition function.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/pipelines.py
Pipeline.dag
def dag(self) -> Tuple[Dict, Dict]: """Construct the DAG of this pipeline based on the its operations and their downstream.""" from pipelines import dags operations = self.operations.all().prefetch_related('downstream_operations') def get_downstream(op): return op.downstrea...
python
def dag(self) -> Tuple[Dict, Dict]: """Construct the DAG of this pipeline based on the its operations and their downstream.""" from pipelines import dags operations = self.operations.all().prefetch_related('downstream_operations') def get_downstream(op): return op.downstrea...
[ "def", "dag", "(", "self", ")", "->", "Tuple", "[", "Dict", ",", "Dict", "]", ":", "from", "pipelines", "import", "dags", "operations", "=", "self", ".", "operations", ".", "all", "(", ")", ".", "prefetch_related", "(", "'downstream_operations'", ")", "d...
Construct the DAG of this pipeline based on the its operations and their downstream.
[ "Construct", "the", "DAG", "of", "this", "pipeline", "based", "on", "the", "its", "operations", "and", "their", "downstream", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/pipelines.py#L136-L145
train
Construct the DAG of this pipeline based on the operations and their downstream.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/pipelines.py
Operation.get_countdown
def get_countdown(self, retries) -> int: """Calculate the countdown for a celery task retry.""" retry_delay = self.retry_delay if self.retry_exponential_backoff: return min( max(2 ** retries, retry_delay), # Exp. backoff self.max_retry_delay # The co...
python
def get_countdown(self, retries) -> int: """Calculate the countdown for a celery task retry.""" retry_delay = self.retry_delay if self.retry_exponential_backoff: return min( max(2 ** retries, retry_delay), # Exp. backoff self.max_retry_delay # The co...
[ "def", "get_countdown", "(", "self", ",", "retries", ")", "->", "int", ":", "retry_delay", "=", "self", ".", "retry_delay", "if", "self", ".", "retry_exponential_backoff", ":", "return", "min", "(", "max", "(", "2", "**", "retries", ",", "retry_delay", ")"...
Calculate the countdown for a celery task retry.
[ "Calculate", "the", "countdown", "for", "a", "celery", "task", "retry", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/pipelines.py#L248-L256
train
Calculate the countdown for a celery task retry.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/pipelines.py
Operation.get_run_params
def get_run_params(self) -> Dict: """Return the params to run the celery task.""" params = {} if self.celery_queue: params['queue'] = self.celery_queue if self.timeout: params['soft_time_limit'] = self.timeout # We set also a hard time limit that will...
python
def get_run_params(self) -> Dict: """Return the params to run the celery task.""" params = {} if self.celery_queue: params['queue'] = self.celery_queue if self.timeout: params['soft_time_limit'] = self.timeout # We set also a hard time limit that will...
[ "def", "get_run_params", "(", "self", ")", "->", "Dict", ":", "params", "=", "{", "}", "if", "self", ".", "celery_queue", ":", "params", "[", "'queue'", "]", "=", "self", ".", "celery_queue", "if", "self", ".", "timeout", ":", "params", "[", "'soft_tim...
Return the params to run the celery task.
[ "Return", "the", "params", "to", "run", "the", "celery", "task", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/pipelines.py#L258-L273
train
Return the params to run the celery task.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/pipelines.py
RunModel.can_transition
def can_transition(self, status_from: str, status_to: str) -> bool: """Update the status of the current instance. Returns: boolean: if the instance is updated. """ if not self.STATUSES.can_transition(status_from=status_from, status_to=status_to): _logger.info( ...
python
def can_transition(self, status_from: str, status_to: str) -> bool: """Update the status of the current instance. Returns: boolean: if the instance is updated. """ if not self.STATUSES.can_transition(status_from=status_from, status_to=status_to): _logger.info( ...
[ "def", "can_transition", "(", "self", ",", "status_from", ":", "str", ",", "status_to", ":", "str", ")", "->", "bool", ":", "if", "not", "self", ".", "STATUSES", ".", "can_transition", "(", "status_from", "=", "status_from", ",", "status_to", "=", "status_...
Update the status of the current instance. Returns: boolean: if the instance is updated.
[ "Update", "the", "status", "of", "the", "current", "instance", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/pipelines.py#L343-L355
train
Check if the current instance can be updated.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/pipelines.py
PipelineRun.dag
def dag(self) -> Tuple[Dict, Dict]: """Construct the DAG of this pipeline run based on the its operation runs and their downstream. """ from pipelines import dags operation_runs = self.operation_runs.all().prefetch_related('downstream_runs') def get_downstream(op_run): ...
python
def dag(self) -> Tuple[Dict, Dict]: """Construct the DAG of this pipeline run based on the its operation runs and their downstream. """ from pipelines import dags operation_runs = self.operation_runs.all().prefetch_related('downstream_runs') def get_downstream(op_run): ...
[ "def", "dag", "(", "self", ")", "->", "Tuple", "[", "Dict", ",", "Dict", "]", ":", "from", "pipelines", "import", "dags", "operation_runs", "=", "self", ".", "operation_runs", ".", "all", "(", ")", ".", "prefetch_related", "(", "'downstream_runs'", ")", ...
Construct the DAG of this pipeline run based on the its operation runs and their downstream.
[ "Construct", "the", "DAG", "of", "this", "pipeline", "run", "based", "on", "the", "its", "operation", "runs", "and", "their", "downstream", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/pipelines.py#L398-L409
train
Construct the DAG of this pipeline run based on the operation runs and their downstream runs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/pipelines.py
OperationRun.check_concurrency
def check_concurrency(self) -> bool: """Checks the concurrency of the operation run. Checks the concurrency of the operation run to validate if we can start a new operation run. Returns: boolean: Whether to start a new operation run or not. """ if not self.o...
python
def check_concurrency(self) -> bool: """Checks the concurrency of the operation run. Checks the concurrency of the operation run to validate if we can start a new operation run. Returns: boolean: Whether to start a new operation run or not. """ if not self.o...
[ "def", "check_concurrency", "(", "self", ")", "->", "bool", ":", "if", "not", "self", ".", "operation", ".", "concurrency", ":", "# No concurrency set", "return", "True", "ops_count", "=", "self", ".", "operation", ".", "runs", ".", "filter", "(", "status__s...
Checks the concurrency of the operation run. Checks the concurrency of the operation run to validate if we can start a new operation run. Returns: boolean: Whether to start a new operation run or not.
[ "Checks", "the", "concurrency", "of", "the", "operation", "run", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/pipelines.py#L533-L547
train
Checks the concurrency of the operation run.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/pipelines.py
OperationRun.check_upstream_trigger
def check_upstream_trigger(self) -> bool: """Checks the upstream and the trigger rule.""" if self.operation.trigger_policy == TriggerPolicy.ONE_DONE: return self.upstream_runs.filter( status__status__in=self.STATUSES.DONE_STATUS).exists() if self.operation.trigger_pol...
python
def check_upstream_trigger(self) -> bool: """Checks the upstream and the trigger rule.""" if self.operation.trigger_policy == TriggerPolicy.ONE_DONE: return self.upstream_runs.filter( status__status__in=self.STATUSES.DONE_STATUS).exists() if self.operation.trigger_pol...
[ "def", "check_upstream_trigger", "(", "self", ")", "->", "bool", ":", "if", "self", ".", "operation", ".", "trigger_policy", "==", "TriggerPolicy", ".", "ONE_DONE", ":", "return", "self", ".", "upstream_runs", ".", "filter", "(", "status__status__in", "=", "se...
Checks the upstream and the trigger rule.
[ "Checks", "the", "upstream", "and", "the", "trigger", "rule", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/pipelines.py#L549-L570
train
Checks the upstream and the trigger rule.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/pipelines.py
OperationRun.schedule_start
def schedule_start(self) -> bool: """Schedule the task: check first if the task can start: 1. we check that the task is still in the CREATED state. 2. we check that the upstream dependency is met. 3. we check that pipeline can start a new task; i.e. we check the...
python
def schedule_start(self) -> bool: """Schedule the task: check first if the task can start: 1. we check that the task is still in the CREATED state. 2. we check that the upstream dependency is met. 3. we check that pipeline can start a new task; i.e. we check the...
[ "def", "schedule_start", "(", "self", ")", "->", "bool", ":", "if", "self", ".", "last_status", "!=", "self", ".", "STATUSES", ".", "CREATED", ":", "return", "False", "upstream_trigger_check", "=", "self", ".", "check_upstream_trigger", "(", ")", "if", "not"...
Schedule the task: check first if the task can start: 1. we check that the task is still in the CREATED state. 2. we check that the upstream dependency is met. 3. we check that pipeline can start a new task; i.e. we check the concurrency of the pipeline. 4. ...
[ "Schedule", "the", "task", ":", "check", "first", "if", "the", "task", "can", "start", ":", "1", ".", "we", "check", "that", "the", "task", "is", "still", "in", "the", "CREATED", "state", ".", "2", ".", "we", "check", "that", "the", "upstream", "depe...
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/pipelines.py#L578-L623
train
Schedule the task.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/pipelines.py
OperationRun.start
def start(self) -> None: """Start the celery task of this operation.""" kwargs = self.celery_task_context # Update we the operation run id kwargs['operation_run_id'] = self.id # pylint:disable=unsupported-assignment-operation async_result = celery_app.send_task( sel...
python
def start(self) -> None: """Start the celery task of this operation.""" kwargs = self.celery_task_context # Update we the operation run id kwargs['operation_run_id'] = self.id # pylint:disable=unsupported-assignment-operation async_result = celery_app.send_task( sel...
[ "def", "start", "(", "self", ")", "->", "None", ":", "kwargs", "=", "self", ".", "celery_task_context", "# Update we the operation run id", "kwargs", "[", "'operation_run_id'", "]", "=", "self", ".", "id", "# pylint:disable=unsupported-assignment-operation", "async_resu...
Start the celery task of this operation.
[ "Start", "the", "celery", "task", "of", "this", "operation", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/pipelines.py#L625-L636
train
Start the celery task of this operation.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/docker_images/image_info.py
get_experiment_image_info
def get_experiment_image_info(experiment: 'Experiment') -> Tuple[str, str]: """Return the image name and image tag for an experiment""" project_name = experiment.project.name repo_name = project_name image_name = '{}/{}'.format(conf.get('REGISTRY_URI'), repo_name) image_tag = experiment.code_refere...
python
def get_experiment_image_info(experiment: 'Experiment') -> Tuple[str, str]: """Return the image name and image tag for an experiment""" project_name = experiment.project.name repo_name = project_name image_name = '{}/{}'.format(conf.get('REGISTRY_URI'), repo_name) image_tag = experiment.code_refere...
[ "def", "get_experiment_image_info", "(", "experiment", ":", "'Experiment'", ")", "->", "Tuple", "[", "str", ",", "str", "]", ":", "project_name", "=", "experiment", ".", "project", ".", "name", "repo_name", "=", "project_name", "image_name", "=", "'{}/{}'", "....
Return the image name and image tag for an experiment
[ "Return", "the", "image", "name", "and", "image", "tag", "for", "an", "experiment" ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/docker_images/image_info.py#L12-L19
train
Return the image name and image tag for an experiment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/docker_images/image_info.py
get_job_image_info
def get_job_image_info(project: 'Project', job: Any) -> Tuple[str, str]: """Return the image name and image tag for a job""" project_name = project.name repo_name = project_name image_name = '{}/{}'.format(conf.get('REGISTRY_URI'), repo_name) try: last_commit = project.repo.last_commit ...
python
def get_job_image_info(project: 'Project', job: Any) -> Tuple[str, str]: """Return the image name and image tag for a job""" project_name = project.name repo_name = project_name image_name = '{}/{}'.format(conf.get('REGISTRY_URI'), repo_name) try: last_commit = project.repo.last_commit ...
[ "def", "get_job_image_info", "(", "project", ":", "'Project'", ",", "job", ":", "Any", ")", "->", "Tuple", "[", "str", ",", "str", "]", ":", "project_name", "=", "project", ".", "name", "repo_name", "=", "project_name", "image_name", "=", "'{}/{}'", ".", ...
Return the image name and image tag for a job
[ "Return", "the", "image", "name", "and", "image", "tag", "for", "a", "job" ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/docker_images/image_info.py#L22-L32
train
Return the image name and image tag for a job
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/docker_images/image_info.py
get_notebook_image_info
def get_notebook_image_info(project: 'Project', job: Any) -> Tuple[str, str]: """Return the image name and image tag for a job""" image_name, _ = get_job_image_info(project, job) return image_name, LATEST_IMAGE_TAG
python
def get_notebook_image_info(project: 'Project', job: Any) -> Tuple[str, str]: """Return the image name and image tag for a job""" image_name, _ = get_job_image_info(project, job) return image_name, LATEST_IMAGE_TAG
[ "def", "get_notebook_image_info", "(", "project", ":", "'Project'", ",", "job", ":", "Any", ")", "->", "Tuple", "[", "str", ",", "str", "]", ":", "image_name", ",", "_", "=", "get_job_image_info", "(", "project", ",", "job", ")", "return", "image_name", ...
Return the image name and image tag for a job
[ "Return", "the", "image", "name", "and", "image", "tag", "for", "a", "job" ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/docker_images/image_info.py#L35-L38
train
Return the image name and image tag for a job
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/hpsearch/iteration_managers/bayesian_optimization.py
BOIterationManager.create_iteration
def create_iteration(self, num_suggestions): """Create an iteration for the experiment group.""" from db.models.experiment_groups import ExperimentGroupIteration iteration_config = self.experiment_group.iteration_config if iteration_config is None: iteration = 0 ...
python
def create_iteration(self, num_suggestions): """Create an iteration for the experiment group.""" from db.models.experiment_groups import ExperimentGroupIteration iteration_config = self.experiment_group.iteration_config if iteration_config is None: iteration = 0 ...
[ "def", "create_iteration", "(", "self", ",", "num_suggestions", ")", ":", "from", "db", ".", "models", ".", "experiment_groups", "import", "ExperimentGroupIteration", "iteration_config", "=", "self", ".", "experiment_group", ".", "iteration_config", "if", "iteration_c...
Create an iteration for the experiment group.
[ "Create", "an", "iteration", "for", "the", "experiment", "group", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/hpsearch/iteration_managers/bayesian_optimization.py#L9-L38
train
Create an iteration for the experiment group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/hpsearch/iteration_managers/bayesian_optimization.py
BOIterationManager.update_iteration
def update_iteration(self): """Update the last experiment group's iteration with experiment performance.""" iteration_config = self.get_iteration_config() if not iteration_config: return experiments_metrics = self.experiment_group.get_experiments_metrics( experime...
python
def update_iteration(self): """Update the last experiment group's iteration with experiment performance.""" iteration_config = self.get_iteration_config() if not iteration_config: return experiments_metrics = self.experiment_group.get_experiments_metrics( experime...
[ "def", "update_iteration", "(", "self", ")", ":", "iteration_config", "=", "self", ".", "get_iteration_config", "(", ")", "if", "not", "iteration_config", ":", "return", "experiments_metrics", "=", "self", ".", "experiment_group", ".", "get_experiments_metrics", "("...
Update the last experiment group's iteration with experiment performance.
[ "Update", "the", "last", "experiment", "group", "s", "iteration", "with", "experiment", "performance", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/hpsearch/iteration_managers/bayesian_optimization.py#L40-L54
train
Update the last experiment group s iteration with experiment performance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/hpsearch/search_managers/hyperband.py
HyperbandSearchManager.get_n_config_to_keep
def get_n_config_to_keep(self, n_suggestions, bracket_iteration): """Return the number of configs to keep and resume.""" n_configs = n_suggestions * (self.eta ** -bracket_iteration) return int(n_configs / self.eta)
python
def get_n_config_to_keep(self, n_suggestions, bracket_iteration): """Return the number of configs to keep and resume.""" n_configs = n_suggestions * (self.eta ** -bracket_iteration) return int(n_configs / self.eta)
[ "def", "get_n_config_to_keep", "(", "self", ",", "n_suggestions", ",", "bracket_iteration", ")", ":", "n_configs", "=", "n_suggestions", "*", "(", "self", ".", "eta", "**", "-", "bracket_iteration", ")", "return", "int", "(", "n_configs", "/", "self", ".", "...
Return the number of configs to keep and resume.
[ "Return", "the", "number", "of", "configs", "to", "keep", "and", "resume", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/hpsearch/search_managers/hyperband.py#L83-L86
train
Return the number of configs to keep and resume.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/hpsearch/search_managers/hyperband.py
HyperbandSearchManager.get_n_config_to_keep_for_iteration
def get_n_config_to_keep_for_iteration(self, iteration, bracket_iteration): """Return the number of configs to keep for an iteration and iteration bracket. This is just util function around `get_n_config_to_keep` """ bracket = self.get_bracket(iteration=iteration) if bracket_ite...
python
def get_n_config_to_keep_for_iteration(self, iteration, bracket_iteration): """Return the number of configs to keep for an iteration and iteration bracket. This is just util function around `get_n_config_to_keep` """ bracket = self.get_bracket(iteration=iteration) if bracket_ite...
[ "def", "get_n_config_to_keep_for_iteration", "(", "self", ",", "iteration", ",", "bracket_iteration", ")", ":", "bracket", "=", "self", ".", "get_bracket", "(", "iteration", "=", "iteration", ")", "if", "bracket_iteration", "==", "bracket", "+", "1", ":", "# End...
Return the number of configs to keep for an iteration and iteration bracket. This is just util function around `get_n_config_to_keep`
[ "Return", "the", "number", "of", "configs", "to", "keep", "for", "an", "iteration", "and", "iteration", "bracket", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/hpsearch/search_managers/hyperband.py#L88-L100
train
Return the number of configs to keep for an iteration and bracket.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/hpsearch/search_managers/hyperband.py
HyperbandSearchManager.get_n_resources_for_iteration
def get_n_resources_for_iteration(self, iteration, bracket_iteration): """Return the number of iterations to run for this barcket_i This is just util function around `get_n_resources` """ bracket = self.get_bracket(iteration=iteration) n_resources = self.get_resources(bracket=br...
python
def get_n_resources_for_iteration(self, iteration, bracket_iteration): """Return the number of iterations to run for this barcket_i This is just util function around `get_n_resources` """ bracket = self.get_bracket(iteration=iteration) n_resources = self.get_resources(bracket=br...
[ "def", "get_n_resources_for_iteration", "(", "self", ",", "iteration", ",", "bracket_iteration", ")", ":", "bracket", "=", "self", ".", "get_bracket", "(", "iteration", "=", "iteration", ")", "n_resources", "=", "self", ".", "get_resources", "(", "bracket", "=",...
Return the number of iterations to run for this barcket_i This is just util function around `get_n_resources`
[ "Return", "the", "number", "of", "iterations", "to", "run", "for", "this", "barcket_i" ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/hpsearch/search_managers/hyperband.py#L106-L113
train
Return the number of resources for this iteration
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/hpsearch/search_managers/hyperband.py
HyperbandSearchManager.get_suggestions
def get_suggestions(self, iteration_config=None): """Return a list of suggestions/arms based on hyperband.""" if not iteration_config or not isinstance(iteration_config, HyperbandIterationConfig): raise ValueError('Hyperband get suggestions requires an iteration.') bracket = self.get...
python
def get_suggestions(self, iteration_config=None): """Return a list of suggestions/arms based on hyperband.""" if not iteration_config or not isinstance(iteration_config, HyperbandIterationConfig): raise ValueError('Hyperband get suggestions requires an iteration.') bracket = self.get...
[ "def", "get_suggestions", "(", "self", ",", "iteration_config", "=", "None", ")", ":", "if", "not", "iteration_config", "or", "not", "isinstance", "(", "iteration_config", ",", "HyperbandIterationConfig", ")", ":", "raise", "ValueError", "(", "'Hyperband get suggest...
Return a list of suggestions/arms based on hyperband.
[ "Return", "a", "list", "of", "suggestions", "/", "arms", "based", "on", "hyperband", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/hpsearch/search_managers/hyperband.py#L115-L131
train
Return a list of suggestions based on hyperband.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/hpsearch/search_managers/hyperband.py
HyperbandSearchManager.should_reschedule
def should_reschedule(self, iteration, bracket_iteration): """Return a boolean to indicate if we need to reschedule another iteration.""" bracket = self.get_bracket(iteration=iteration) if bracket_iteration < bracket: # The bracket is still processing return False ...
python
def should_reschedule(self, iteration, bracket_iteration): """Return a boolean to indicate if we need to reschedule another iteration.""" bracket = self.get_bracket(iteration=iteration) if bracket_iteration < bracket: # The bracket is still processing return False ...
[ "def", "should_reschedule", "(", "self", ",", "iteration", ",", "bracket_iteration", ")", ":", "bracket", "=", "self", ".", "get_bracket", "(", "iteration", "=", "iteration", ")", "if", "bracket_iteration", "<", "bracket", ":", "# The bracket is still processing", ...
Return a boolean to indicate if we need to reschedule another iteration.
[ "Return", "a", "boolean", "to", "indicate", "if", "we", "need", "to", "reschedule", "another", "iteration", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/hpsearch/search_managers/hyperband.py#L133-L141
train
Return a boolean to indicate if we need to reschedule another iteration.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/hpsearch/search_managers/hyperband.py
HyperbandSearchManager.should_reduce_configs
def should_reduce_configs(self, iteration, bracket_iteration): """Return a boolean to indicate if we need to reschedule another bracket iteration.""" n_configs_to_keep = self.get_n_config_to_keep_for_iteration( iteration=iteration, bracket_iteration=bracket_iteration) return n_config...
python
def should_reduce_configs(self, iteration, bracket_iteration): """Return a boolean to indicate if we need to reschedule another bracket iteration.""" n_configs_to_keep = self.get_n_config_to_keep_for_iteration( iteration=iteration, bracket_iteration=bracket_iteration) return n_config...
[ "def", "should_reduce_configs", "(", "self", ",", "iteration", ",", "bracket_iteration", ")", ":", "n_configs_to_keep", "=", "self", ".", "get_n_config_to_keep_for_iteration", "(", "iteration", "=", "iteration", ",", "bracket_iteration", "=", "bracket_iteration", ")", ...
Return a boolean to indicate if we need to reschedule another bracket iteration.
[ "Return", "a", "boolean", "to", "indicate", "if", "we", "need", "to", "reschedule", "another", "bracket", "iteration", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/hpsearch/search_managers/hyperband.py#L143-L147
train
Return a boolean to indicate if we need to reschedule another bracket iteration.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/libs/resource_validation.py
validate_resource
def validate_resource(resource) -> None: """Validates a resource""" if resource is not None and not isinstance(resource, dict): raise ValidationError('The resource is not valid.') if isinstance(resource, dict) and set(resource.keys()) <= {'requests', 'limits'}: raise ValidationError( ...
python
def validate_resource(resource) -> None: """Validates a resource""" if resource is not None and not isinstance(resource, dict): raise ValidationError('The resource is not valid.') if isinstance(resource, dict) and set(resource.keys()) <= {'requests', 'limits'}: raise ValidationError( ...
[ "def", "validate_resource", "(", "resource", ")", "->", "None", ":", "if", "resource", "is", "not", "None", "and", "not", "isinstance", "(", "resource", ",", "dict", ")", ":", "raise", "ValidationError", "(", "'The resource is not valid.'", ")", "if", "isinsta...
Validates a resource
[ "Validates", "a", "resource" ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/libs/resource_validation.py#L4-L11
train
Validates a resource.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/scheduler/spawners/templates/experiment_jobs/manager.py
ResourceManager.get_init_container
def get_init_container(self, init_command, init_args, env_vars, context_mounts, persistence_outputs, persistence_data): """Pod init container for sett...
python
def get_init_container(self, init_command, init_args, env_vars, context_mounts, persistence_outputs, persistence_data): """Pod init container for sett...
[ "def", "get_init_container", "(", "self", ",", "init_command", ",", "init_args", ",", "env_vars", ",", "context_mounts", ",", "persistence_outputs", ",", "persistence_data", ")", ":", "env_vars", "=", "to_list", "(", "env_vars", ",", "check_none", "=", "True", "...
Pod init container for setting outputs path.
[ "Pod", "init", "container", "for", "setting", "outputs", "path", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/scheduler/spawners/templates/experiment_jobs/manager.py#L169-L210
train
Get the init container for setting outputs path.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/repos.py
RepoMixin.path
def path(self) -> str: """We need to nest the git path inside the project path to make it easier to create docker images.""" return os.path.join(self.project_path, self.project.name)
python
def path(self) -> str: """We need to nest the git path inside the project path to make it easier to create docker images.""" return os.path.join(self.project_path, self.project.name)
[ "def", "path", "(", "self", ")", "->", "str", ":", "return", "os", ".", "path", ".", "join", "(", "self", ".", "project_path", ",", "self", ".", "project", ".", "name", ")" ]
We need to nest the git path inside the project path to make it easier to create docker images.
[ "We", "need", "to", "nest", "the", "git", "path", "inside", "the", "project", "path", "to", "make", "it", "easier", "to", "create", "docker", "images", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/repos.py#L23-L26
train
The path of the git repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/repos.py
RepoMixin.last_commit
def last_commit(self) -> Tuple: """Returns a tuple (hash, and commit object)""" from libs.repos import git return git.get_last_commit(repo_path=self.path)
python
def last_commit(self) -> Tuple: """Returns a tuple (hash, and commit object)""" from libs.repos import git return git.get_last_commit(repo_path=self.path)
[ "def", "last_commit", "(", "self", ")", "->", "Tuple", ":", "from", "libs", ".", "repos", "import", "git", "return", "git", ".", "get_last_commit", "(", "repo_path", "=", "self", ".", "path", ")" ]
Returns a tuple (hash, and commit object)
[ "Returns", "a", "tuple", "(", "hash", "and", "commit", "object", ")" ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/repos.py#L35-L39
train
Returns a tuple of hash and commit object
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/scheduler/spawners/tensorboard_spawner.py
TensorboardSpawner.validate_stores_secrets_keys
def validate_stores_secrets_keys(stores_secrets): """Validates that we can only authenticate to one S3 and one GCS.""" stores = set([]) for store_secret in stores_secrets: if store_secret['store'] in stores: raise TensorboardValidation('Received an invalid store confi...
python
def validate_stores_secrets_keys(stores_secrets): """Validates that we can only authenticate to one S3 and one GCS.""" stores = set([]) for store_secret in stores_secrets: if store_secret['store'] in stores: raise TensorboardValidation('Received an invalid store confi...
[ "def", "validate_stores_secrets_keys", "(", "stores_secrets", ")", ":", "stores", "=", "set", "(", "[", "]", ")", "for", "store_secret", "in", "stores_secrets", ":", "if", "store_secret", "[", "'store'", "]", "in", "stores", ":", "raise", "TensorboardValidation"...
Validates that we can only authenticate to one S3 and one GCS.
[ "Validates", "that", "we", "can", "only", "authenticate", "to", "one", "S3", "and", "one", "GCS", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/scheduler/spawners/tensorboard_spawner.py#L92-L100
train
Validates that we can only authenticate to one S3 and one GCS.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/scheduler/spawners/tensorboard_spawner.py
TensorboardSpawner.get_stores_secrets_volumes
def get_stores_secrets_volumes(cls, stores_secrets): """Handles the case of GCS and S3 and create a volume with secret file.""" volumes = [] volume_mounts = [] for store_secret in stores_secrets: store = store_secret['store'] if store in {GCS, S3}: ...
python
def get_stores_secrets_volumes(cls, stores_secrets): """Handles the case of GCS and S3 and create a volume with secret file.""" volumes = [] volume_mounts = [] for store_secret in stores_secrets: store = store_secret['store'] if store in {GCS, S3}: ...
[ "def", "get_stores_secrets_volumes", "(", "cls", ",", "stores_secrets", ")", ":", "volumes", "=", "[", "]", "volume_mounts", "=", "[", "]", "for", "store_secret", "in", "stores_secrets", ":", "store", "=", "store_secret", "[", "'store'", "]", "if", "store", ...
Handles the case of GCS and S3 and create a volume with secret file.
[ "Handles", "the", "case", "of", "GCS", "and", "S3", "and", "create", "a", "volume", "with", "secret", "file", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/scheduler/spawners/tensorboard_spawner.py#L103-L118
train
Handles the case of GCS and S3 and create a volume with secret file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/scheduler/spawners/tensorboard_spawner.py
TensorboardSpawner.get_stores_secrets_command_args
def get_stores_secrets_command_args(cls, stores_secrets): """Create an auth command for S3 and GCS.""" commands = [] for store_secret in stores_secrets: store = store_secret['store'] if store == GCS: commands.append('export GOOGLE_APPLICATION_CREDENTIALS={...
python
def get_stores_secrets_command_args(cls, stores_secrets): """Create an auth command for S3 and GCS.""" commands = [] for store_secret in stores_secrets: store = store_secret['store'] if store == GCS: commands.append('export GOOGLE_APPLICATION_CREDENTIALS={...
[ "def", "get_stores_secrets_command_args", "(", "cls", ",", "stores_secrets", ")", ":", "commands", "=", "[", "]", "for", "store_secret", "in", "stores_secrets", ":", "store", "=", "store_secret", "[", "'store'", "]", "if", "store", "==", "GCS", ":", "commands"...
Create an auth command for S3 and GCS.
[ "Create", "an", "auth", "command", "for", "S3", "and", "GCS", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/scheduler/spawners/tensorboard_spawner.py#L121-L141
train
Create an auth command for S3 and GCS.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/redis/ephemeral_tokens.py
RedisEphemeralTokens.make_token
def make_token(cls, ephemeral_token: 'RedisEphemeralTokens') -> str: """ Returns a token to be used x number of times to allow a user account to access certain resource. """ value = ephemeral_token.key if ephemeral_token.scope: value += ''.join(ephemeral_token...
python
def make_token(cls, ephemeral_token: 'RedisEphemeralTokens') -> str: """ Returns a token to be used x number of times to allow a user account to access certain resource. """ value = ephemeral_token.key if ephemeral_token.scope: value += ''.join(ephemeral_token...
[ "def", "make_token", "(", "cls", ",", "ephemeral_token", ":", "'RedisEphemeralTokens'", ")", "->", "str", ":", "value", "=", "ephemeral_token", ".", "key", "if", "ephemeral_token", ".", "scope", ":", "value", "+=", "''", ".", "join", "(", "ephemeral_token", ...
Returns a token to be used x number of times to allow a user account to access certain resource.
[ "Returns", "a", "token", "to", "be", "used", "x", "number", "of", "times", "to", "allow", "a", "user", "account", "to", "access", "certain", "resource", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/redis/ephemeral_tokens.py#L82-L91
train
Returns a token to be used for a user account to access the resource.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/redis/ephemeral_tokens.py
RedisEphemeralTokens.check_token
def check_token(self, token: 'RedisEphemeralTokens') -> bool: """ Check that a token is correct for a given scope token. """ if self.get_state() is None: # Token expired return False correct_token = self.make_token(self) self.clear() return constant_...
python
def check_token(self, token: 'RedisEphemeralTokens') -> bool: """ Check that a token is correct for a given scope token. """ if self.get_state() is None: # Token expired return False correct_token = self.make_token(self) self.clear() return constant_...
[ "def", "check_token", "(", "self", ",", "token", ":", "'RedisEphemeralTokens'", ")", "->", "bool", ":", "if", "self", ".", "get_state", "(", ")", "is", "None", ":", "# Token expired", "return", "False", "correct_token", "=", "self", ".", "make_token", "(", ...
Check that a token is correct for a given scope token.
[ "Check", "that", "a", "token", "is", "correct", "for", "a", "given", "scope", "token", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/redis/ephemeral_tokens.py#L99-L108
train
Check that a given token is correct for a given scope.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/hpsearch/search_managers/bayesian_optimization/acquisition_function.py
UtilityFunction.max_compute
def max_compute(self, y_max, bounds, n_warmup=100000, n_iter=250): """A function to find the maximum of the acquisition function It uses a combination of random sampling (cheap) and the 'L-BFGS-B' optimization method. First by sampling `n_warmup` (1e5) points at random, and then runnin...
python
def max_compute(self, y_max, bounds, n_warmup=100000, n_iter=250): """A function to find the maximum of the acquisition function It uses a combination of random sampling (cheap) and the 'L-BFGS-B' optimization method. First by sampling `n_warmup` (1e5) points at random, and then runnin...
[ "def", "max_compute", "(", "self", ",", "y_max", ",", "bounds", ",", "n_warmup", "=", "100000", ",", "n_iter", "=", "250", ")", ":", "# Warm up with random points", "x_tries", "=", "self", ".", "random_generator", ".", "uniform", "(", "bounds", "[", ":", "...
A function to find the maximum of the acquisition function It uses a combination of random sampling (cheap) and the 'L-BFGS-B' optimization method. First by sampling `n_warmup` (1e5) points at random, and then running L-BFGS-B from `n_iter` (250) random starting points. Params: ...
[ "A", "function", "to", "find", "the", "maximum", "of", "the", "acquisition", "function" ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/hpsearch/search_managers/bayesian_optimization/acquisition_function.py#L70-L115
train
A function to find the maximum of the acquisition function.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/api/filters.py
OrderingFilter.get_ordering
def get_ordering(self, request, queryset, view): """ Ordering is set by a comma delimited ?ordering=... query parameter. The `ordering` query parameter can be overridden by setting the `ordering_param` value on the OrderingFilter or by specifying an `ORDERING_PARAM` value in the...
python
def get_ordering(self, request, queryset, view): """ Ordering is set by a comma delimited ?ordering=... query parameter. The `ordering` query parameter can be overridden by setting the `ordering_param` value on the OrderingFilter or by specifying an `ORDERING_PARAM` value in the...
[ "def", "get_ordering", "(", "self", ",", "request", ",", "queryset", ",", "view", ")", ":", "params", "=", "request", ".", "query_params", ".", "get", "(", "self", ".", "ordering_param", ")", "if", "params", ":", "fields", "=", "strip_spaces", "(", "valu...
Ordering is set by a comma delimited ?ordering=... query parameter. The `ordering` query parameter can be overridden by setting the `ordering_param` value on the OrderingFilter or by specifying an `ORDERING_PARAM` value in the API settings.
[ "Ordering", "is", "set", "by", "a", "comma", "delimited", "?ordering", "=", "...", "query", "parameter", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/api/filters.py#L74-L90
train
Returns the ordering for the current locale.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/scheduler/spawners/templates/notebooks/manager.py
ResourceManager.get_init_container
def get_init_container(self, init_command, init_args, env_vars, context_mounts, persistence_outputs, persistence_data): """Pod init container for sett...
python
def get_init_container(self, init_command, init_args, env_vars, context_mounts, persistence_outputs, persistence_data): """Pod init container for sett...
[ "def", "get_init_container", "(", "self", ",", "init_command", ",", "init_args", ",", "env_vars", ",", "context_mounts", ",", "persistence_outputs", ",", "persistence_data", ")", ":", "env_vars", "=", "to_list", "(", "env_vars", ",", "check_none", "=", "True", "...
Pod init container for setting outputs path.
[ "Pod", "init", "container", "for", "setting", "outputs", "path", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/scheduler/spawners/templates/notebooks/manager.py#L126-L145
train
Get the init container for setting outputs path.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/api/users/views.py
RegistrationView.get_activation_key
def get_activation_key(self, user): """ Generate the activation key which will be emailed to the user. """ return signing.dumps( obj=getattr(user, user.USERNAME_FIELD), salt=self.key_salt )
python
def get_activation_key(self, user): """ Generate the activation key which will be emailed to the user. """ return signing.dumps( obj=getattr(user, user.USERNAME_FIELD), salt=self.key_salt )
[ "def", "get_activation_key", "(", "self", ",", "user", ")", ":", "return", "signing", ".", "dumps", "(", "obj", "=", "getattr", "(", "user", ",", "user", ".", "USERNAME_FIELD", ")", ",", "salt", "=", "self", ".", "key_salt", ")" ]
Generate the activation key which will be emailed to the user.
[ "Generate", "the", "activation", "key", "which", "will", "be", "emailed", "to", "the", "user", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/api/users/views.py#L183-L191
train
Generate the activation key which will be emailed to the user.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/api/users/views.py
RegistrationView.send_activation_email
def send_activation_email(self, user): """ Send the activation email. The activation key is the username, signed using TimestampSigner. """ activation_key = self.get_activation_key(user) context = self.get_email_context(activation_key) context.update({ ...
python
def send_activation_email(self, user): """ Send the activation email. The activation key is the username, signed using TimestampSigner. """ activation_key = self.get_activation_key(user) context = self.get_email_context(activation_key) context.update({ ...
[ "def", "send_activation_email", "(", "self", ",", "user", ")", ":", "activation_key", "=", "self", ".", "get_activation_key", "(", "user", ")", "context", "=", "self", ".", "get_email_context", "(", "activation_key", ")", "context", ".", "update", "(", "{", ...
Send the activation email. The activation key is the username, signed using TimestampSigner.
[ "Send", "the", "activation", "email", ".", "The", "activation", "key", "is", "the", "username", "signed", "using", "TimestampSigner", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/api/users/views.py#L204-L222
train
Send the activation email to the user.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/api/users/views.py
SimpleRegistrationView.create_inactive_user
def create_inactive_user(self, form): """Create the inactive user account and wait for validation from superuser""" new_user = form.save(commit=False) new_user.is_active = False new_user.save() return new_user
python
def create_inactive_user(self, form): """Create the inactive user account and wait for validation from superuser""" new_user = form.save(commit=False) new_user.is_active = False new_user.save() return new_user
[ "def", "create_inactive_user", "(", "self", ",", "form", ")", ":", "new_user", "=", "form", ".", "save", "(", "commit", "=", "False", ")", "new_user", ".", "is_active", "=", "False", "new_user", ".", "save", "(", ")", "return", "new_user" ]
Create the inactive user account and wait for validation from superuser
[ "Create", "the", "inactive", "user", "account", "and", "wait", "for", "validation", "from", "superuser" ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/api/users/views.py#L230-L235
train
Create the inactive user account and wait for validation from superuser
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/api/users/views.py
ActivationView.validate_key
def validate_key(self, activation_key): """ Verify that the activation key is valid and within the permitted activation time window, returning the username if valid or ``None`` if not. """ try: username = signing.loads( activation_key, ...
python
def validate_key(self, activation_key): """ Verify that the activation key is valid and within the permitted activation time window, returning the username if valid or ``None`` if not. """ try: username = signing.loads( activation_key, ...
[ "def", "validate_key", "(", "self", ",", "activation_key", ")", ":", "try", ":", "username", "=", "signing", ".", "loads", "(", "activation_key", ",", "salt", "=", "self", ".", "key_salt", ",", "max_age", "=", "conf", ".", "get", "(", "'ACCOUNT_ACTIVATION_...
Verify that the activation key is valid and within the permitted activation time window, returning the username if valid or ``None`` if not.
[ "Verify", "that", "the", "activation", "key", "is", "valid", "and", "within", "the", "permitted", "activation", "time", "window", "returning", "the", "username", "if", "valid", "or", "None", "if", "not", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/api/users/views.py#L267-L284
train
Verify that the activation key is valid and within the activation time window return the username if valid or None if not.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/api/users/views.py
ActivationView.get_user
def get_user(self, username): """ Given the verified username, look up and return the corresponding user account if it exists, or ``None`` if it doesn't. """ User = get_user_model() # noqa try: user = User.objects.get(**{ User.USERNAM...
python
def get_user(self, username): """ Given the verified username, look up and return the corresponding user account if it exists, or ``None`` if it doesn't. """ User = get_user_model() # noqa try: user = User.objects.get(**{ User.USERNAM...
[ "def", "get_user", "(", "self", ",", "username", ")", ":", "User", "=", "get_user_model", "(", ")", "# noqa", "try", ":", "user", "=", "User", ".", "objects", ".", "get", "(", "*", "*", "{", "User", ".", "USERNAME_FIELD", ":", "username", ",", "'is_a...
Given the verified username, look up and return the corresponding user account if it exists, or ``None`` if it doesn't.
[ "Given", "the", "verified", "username", "look", "up", "and", "return", "the", "corresponding", "user", "account", "if", "it", "exists", "or", "None", "if", "it", "doesn", "t", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/api/users/views.py#L286-L301
train
Look up and return the corresponding user account if it exists or None if it doesn t.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/api/users/views.py
ActivationView.get
def get(self, request, *args, **kwargs): """The base activation logic; subclasses should leave this method alone and implement activate(), which is called from this method. """ activated_user = self.activate(*args, **kwargs) if activated_user: users_signals.user_activ...
python
def get(self, request, *args, **kwargs): """The base activation logic; subclasses should leave this method alone and implement activate(), which is called from this method. """ activated_user = self.activate(*args, **kwargs) if activated_user: users_signals.user_activ...
[ "def", "get", "(", "self", ",", "request", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "activated_user", "=", "self", ".", "activate", "(", "*", "args", ",", "*", "*", "kwargs", ")", "if", "activated_user", ":", "users_signals", ".", "user_a...
The base activation logic; subclasses should leave this method alone and implement activate(), which is called from this method.
[ "The", "base", "activation", "logic", ";", "subclasses", "should", "leave", "this", "method", "alone", "and", "implement", "activate", "()", "which", "is", "called", "from", "this", "method", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/api/users/views.py#L303-L315
train
The base get method that handles activation logic.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/scheduler/spawners/templates/resource_manager.py
BaseResourceManager.get_pod_container
def get_pod_container(self, volume_mounts, persistence_outputs=None, persistence_data=None, outputs_refs_jobs=None, outputs_refs_experiments=None, secret_refs=None,...
python
def get_pod_container(self, volume_mounts, persistence_outputs=None, persistence_data=None, outputs_refs_jobs=None, outputs_refs_experiments=None, secret_refs=None,...
[ "def", "get_pod_container", "(", "self", ",", "volume_mounts", ",", "persistence_outputs", "=", "None", ",", "persistence_data", "=", "None", ",", "outputs_refs_jobs", "=", "None", ",", "outputs_refs_experiments", "=", "None", ",", "secret_refs", "=", "None", ",",...
Pod job container for task.
[ "Pod", "job", "container", "for", "task", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/scheduler/spawners/templates/resource_manager.py#L100-L143
train
Get a pod container for the current task.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/scheduler/spawners/templates/resource_manager.py
BaseResourceManager.get_sidecar_container
def get_sidecar_container(self, volume_mounts): """Pod sidecar container for task logs.""" return get_sidecar_container( job_container_name=self.job_container_name, sidecar_container_name=self.sidecar_container_name, sidecar_docker_image=self.sidecar_docker_image, ...
python
def get_sidecar_container(self, volume_mounts): """Pod sidecar container for task logs.""" return get_sidecar_container( job_container_name=self.job_container_name, sidecar_container_name=self.sidecar_container_name, sidecar_docker_image=self.sidecar_docker_image, ...
[ "def", "get_sidecar_container", "(", "self", ",", "volume_mounts", ")", ":", "return", "get_sidecar_container", "(", "job_container_name", "=", "self", ".", "job_container_name", ",", "sidecar_container_name", "=", "self", ".", "sidecar_container_name", ",", "sidecar_do...
Pod sidecar container for task logs.
[ "Pod", "sidecar", "container", "for", "task", "logs", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/scheduler/spawners/templates/resource_manager.py#L148-L160
train
Get the sidecar container for task logs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/scheduler/spawners/templates/resource_manager.py
BaseResourceManager.get_task_pod_spec
def get_task_pod_spec(self, volume_mounts, volumes, resource_name, persistence_outputs=None, persistence_data=None, outputs_refs_jobs=None, ...
python
def get_task_pod_spec(self, volume_mounts, volumes, resource_name, persistence_outputs=None, persistence_data=None, outputs_refs_jobs=None, ...
[ "def", "get_task_pod_spec", "(", "self", ",", "volume_mounts", ",", "volumes", ",", "resource_name", ",", "persistence_outputs", "=", "None", ",", "persistence_data", "=", "None", ",", "outputs_refs_jobs", "=", "None", ",", "outputs_refs_experiments", "=", "None", ...
Pod spec to be used to create pods for tasks: master, worker, ps.
[ "Pod", "spec", "to", "be", "used", "to", "create", "pods", "for", "tasks", ":", "master", "worker", "ps", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/scheduler/spawners/templates/resource_manager.py#L172-L251
train
Returns a pod spec for a task.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/sso/wizard.py
IdentityWizard.validate_username
def validate_username(username): """ This validation step is done when we are sure the user does not exit on the systems and we need to create a new user. """ try: validate_slug(username) except ValidationError: username = slugify(username) ...
python
def validate_username(username): """ This validation step is done when we are sure the user does not exit on the systems and we need to create a new user. """ try: validate_slug(username) except ValidationError: username = slugify(username) ...
[ "def", "validate_username", "(", "username", ")", ":", "try", ":", "validate_slug", "(", "username", ")", "except", "ValidationError", ":", "username", "=", "slugify", "(", "username", ")", "user_model_cls", "=", "get_user_model", "(", ")", "_username", "=", "...
This validation step is done when we are sure the user does not exit on the systems and we need to create a new user.
[ "This", "validation", "step", "is", "done", "when", "we", "are", "sure", "the", "user", "does", "not", "exit", "on", "the", "systems", "and", "we", "need", "to", "create", "a", "new", "user", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/sso/wizard.py#L42-L57
train
This validation step is done when we are sure the user exists in the database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/action_manager/action.py
Action._prepare
def _prepare(cls, context: Dict) -> Dict: """This is where you should alter the context to fit the action. Default behaviour will leave the context as it is. """ if not context and cls.raise_empty_context: raise PolyaxonActionException('{} received invalid payload context.'....
python
def _prepare(cls, context: Dict) -> Dict: """This is where you should alter the context to fit the action. Default behaviour will leave the context as it is. """ if not context and cls.raise_empty_context: raise PolyaxonActionException('{} received invalid payload context.'....
[ "def", "_prepare", "(", "cls", ",", "context", ":", "Dict", ")", "->", "Dict", ":", "if", "not", "context", "and", "cls", ".", "raise_empty_context", ":", "raise", "PolyaxonActionException", "(", "'{} received invalid payload context.'", ".", "format", "(", "cls...
This is where you should alter the context to fit the action. Default behaviour will leave the context as it is.
[ "This", "is", "where", "you", "should", "alter", "the", "context", "to", "fit", "the", "action", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/action_manager/action.py#L44-L52
train
This method is used to prepare the payload context.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/scheduler/tasks/experiments.py
copy_experiment
def copy_experiment(experiment): """If experiment is a restart, we should resume from last check point""" try: publisher.publish_experiment_job_log( log_lines='Copying outputs from experiment `{}` into experiment `{}`'.format( experiment.original_experiment.unique_name, exper...
python
def copy_experiment(experiment): """If experiment is a restart, we should resume from last check point""" try: publisher.publish_experiment_job_log( log_lines='Copying outputs from experiment `{}` into experiment `{}`'.format( experiment.original_experiment.unique_name, exper...
[ "def", "copy_experiment", "(", "experiment", ")", ":", "try", ":", "publisher", ".", "publish_experiment_job_log", "(", "log_lines", "=", "'Copying outputs from experiment `{}` into experiment `{}`'", ".", "format", "(", "experiment", ".", "original_experiment", ".", "uni...
If experiment is a restart, we should resume from last check point
[ "If", "experiment", "is", "a", "restart", "we", "should", "resume", "from", "last", "check", "point" ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/scheduler/tasks/experiments.py#L24-L52
train
Copy the outputs of the given experiment into the given experiment.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/event_manager/event_service.py
EventService.record
def record(self, event_type: str, event_data: Mapping = None, instance: Any = None, **kwargs) -> 'Event': """ Validate and record an event. >>> record('event.action', object_instance) """ if not self.is_setup: retur...
python
def record(self, event_type: str, event_data: Mapping = None, instance: Any = None, **kwargs) -> 'Event': """ Validate and record an event. >>> record('event.action', object_instance) """ if not self.is_setup: retur...
[ "def", "record", "(", "self", ",", "event_type", ":", "str", ",", "event_data", ":", "Mapping", "=", "None", ",", "instance", ":", "Any", "=", "None", ",", "*", "*", "kwargs", ")", "->", "'Event'", ":", "if", "not", "self", ".", "is_setup", ":", "r...
Validate and record an event. >>> record('event.action', object_instance)
[ "Validate", "and", "record", "an", "event", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/event_manager/event_service.py#L27-L46
train
Validate and record an event.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/dockerizer/dockerizer/initializer/generate.py
generate
def generate(job, build_path: str, from_image: str, build_steps: Optional[List[str]] = None, env_vars: Optional[List[Tuple[str, str]]] = None, nvidia_bin: str = None, set_lang_env: bool = True, uid: int = None, gid: ...
python
def generate(job, build_path: str, from_image: str, build_steps: Optional[List[str]] = None, env_vars: Optional[List[Tuple[str, str]]] = None, nvidia_bin: str = None, set_lang_env: bool = True, uid: int = None, gid: ...
[ "def", "generate", "(", "job", ",", "build_path", ":", "str", ",", "from_image", ":", "str", ",", "build_steps", ":", "Optional", "[", "List", "[", "str", "]", "]", "=", "None", ",", "env_vars", ":", "Optional", "[", "List", "[", "Tuple", "[", "str",...
Build necessary code for a job to run
[ "Build", "necessary", "code", "for", "a", "job", "to", "run" ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/dockerizer/dockerizer/initializer/generate.py#L10-L31
train
Generate a new image and log it to the job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/hpsearch/search_managers/random.py
RandomSearchManager.get_suggestions
def get_suggestions(self, iteration_config=None): """Return a list of suggestions based on random search. Params: matrix: `dict` representing the {hyperparam: hyperparam matrix config}. n_suggestions: number of suggestions to make. """ matrix = self.hptuning_conf...
python
def get_suggestions(self, iteration_config=None): """Return a list of suggestions based on random search. Params: matrix: `dict` representing the {hyperparam: hyperparam matrix config}. n_suggestions: number of suggestions to make. """ matrix = self.hptuning_conf...
[ "def", "get_suggestions", "(", "self", ",", "iteration_config", "=", "None", ")", ":", "matrix", "=", "self", ".", "hptuning_config", ".", "matrix", "n_suggestions", "=", "self", ".", "hptuning_config", ".", "random_search", ".", "n_experiments", "seed", "=", ...
Return a list of suggestions based on random search. Params: matrix: `dict` representing the {hyperparam: hyperparam matrix config}. n_suggestions: number of suggestions to make.
[ "Return", "a", "list", "of", "suggestions", "based", "on", "random", "search", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/hpsearch/search_managers/random.py#L11-L21
train
Return a list of suggestions based on random search.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/api/experiments/views.py
ExperimentMetricListView.get_serializer
def get_serializer(self, *args, **kwargs): """ if an array is passed, set serializer to many """ if isinstance(kwargs.get('data', {}), list): kwargs['many'] = True return super().get_serializer(*args, **kwargs)
python
def get_serializer(self, *args, **kwargs): """ if an array is passed, set serializer to many """ if isinstance(kwargs.get('data', {}), list): kwargs['many'] = True return super().get_serializer(*args, **kwargs)
[ "def", "get_serializer", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "isinstance", "(", "kwargs", ".", "get", "(", "'data'", ",", "{", "}", ")", ",", "list", ")", ":", "kwargs", "[", "'many'", "]", "=", "True", "return...
if an array is passed, set serializer to many
[ "if", "an", "array", "is", "passed", "set", "serializer", "to", "many" ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/api/experiments/views.py#L516-L520
train
Set serializer to many if data is passed
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/logs_handlers/tasks/log_handlers.py
logs_handle_experiment_job
def logs_handle_experiment_job(experiment_name: str, experiment_uuid: str, log_lines: Optional[Union[str, Iterable[str]]], temp: bool = True) -> None: """Task handling for sidecars logs.""" handle_experiment_job_log(exp...
python
def logs_handle_experiment_job(experiment_name: str, experiment_uuid: str, log_lines: Optional[Union[str, Iterable[str]]], temp: bool = True) -> None: """Task handling for sidecars logs.""" handle_experiment_job_log(exp...
[ "def", "logs_handle_experiment_job", "(", "experiment_name", ":", "str", ",", "experiment_uuid", ":", "str", ",", "log_lines", ":", "Optional", "[", "Union", "[", "str", ",", "Iterable", "[", "str", "]", "]", "]", ",", "temp", ":", "bool", "=", "True", "...
Task handling for sidecars logs.
[ "Task", "handling", "for", "sidecars", "logs", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/logs_handlers/tasks/log_handlers.py#L9-L17
train
Task handling for sidecars logs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/logs_handlers/tasks/log_handlers.py
logs_handle_job
def logs_handle_job(job_uuid: str, job_name: str, log_lines: Optional[Union[str, Iterable[str]]], temp: bool = True) -> None: """Task handling for sidecars logs.""" handle_job_logs(job_uuid=job_uuid, job_name=job_name, ...
python
def logs_handle_job(job_uuid: str, job_name: str, log_lines: Optional[Union[str, Iterable[str]]], temp: bool = True) -> None: """Task handling for sidecars logs.""" handle_job_logs(job_uuid=job_uuid, job_name=job_name, ...
[ "def", "logs_handle_job", "(", "job_uuid", ":", "str", ",", "job_name", ":", "str", ",", "log_lines", ":", "Optional", "[", "Union", "[", "str", ",", "Iterable", "[", "str", "]", "]", "]", ",", "temp", ":", "bool", "=", "True", ")", "->", "None", "...
Task handling for sidecars logs.
[ "Task", "handling", "for", "sidecars", "logs", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/logs_handlers/tasks/log_handlers.py#L21-L29
train
Task handling for sidecars logs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/logs_handlers/tasks/log_handlers.py
logs_handle_build_job
def logs_handle_build_job(job_uuid: str, job_name: str, log_lines: Optional[Union[str, Iterable[str]]], temp: bool = True) -> None: """Task handling for sidecars logs.""" handle_build_job_logs(job_uuid=job_uuid, ...
python
def logs_handle_build_job(job_uuid: str, job_name: str, log_lines: Optional[Union[str, Iterable[str]]], temp: bool = True) -> None: """Task handling for sidecars logs.""" handle_build_job_logs(job_uuid=job_uuid, ...
[ "def", "logs_handle_build_job", "(", "job_uuid", ":", "str", ",", "job_name", ":", "str", ",", "log_lines", ":", "Optional", "[", "Union", "[", "str", ",", "Iterable", "[", "str", "]", "]", "]", ",", "temp", ":", "bool", "=", "True", ")", "->", "None...
Task handling for sidecars logs.
[ "Task", "handling", "for", "sidecars", "logs", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/logs_handlers/tasks/log_handlers.py#L33-L41
train
Task handling for sidecars logs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/hpsearch/iteration_managers/hyperband.py
HyperbandIterationManager.create_iteration
def create_iteration(self, num_suggestions=0): """Create an iteration for the experiment group.""" from db.models.experiment_groups import ExperimentGroupIteration search_manager = self.experiment_group.search_manager iteration_config = self.experiment_group.iteration_config if...
python
def create_iteration(self, num_suggestions=0): """Create an iteration for the experiment group.""" from db.models.experiment_groups import ExperimentGroupIteration search_manager = self.experiment_group.search_manager iteration_config = self.experiment_group.iteration_config if...
[ "def", "create_iteration", "(", "self", ",", "num_suggestions", "=", "0", ")", ":", "from", "db", ".", "models", ".", "experiment_groups", "import", "ExperimentGroupIteration", "search_manager", "=", "self", ".", "experiment_group", ".", "search_manager", "iteration...
Create an iteration for the experiment group.
[ "Create", "an", "iteration", "for", "the", "experiment", "group", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/hpsearch/iteration_managers/hyperband.py#L12-L48
train
Create an iteration for the experiment group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/hpsearch/iteration_managers/hyperband.py
HyperbandIterationManager.get_reduced_configs
def get_reduced_configs(self): """Reduce the experiments to restart.""" iteration_config = self.experiment_group.iteration_config if iteration_config is None: logger.error( 'Experiment group `%s` attempt to update iteration, but has no iteration', self...
python
def get_reduced_configs(self): """Reduce the experiments to restart.""" iteration_config = self.experiment_group.iteration_config if iteration_config is None: logger.error( 'Experiment group `%s` attempt to update iteration, but has no iteration', self...
[ "def", "get_reduced_configs", "(", "self", ")", ":", "iteration_config", "=", "self", ".", "experiment_group", ".", "iteration_config", "if", "iteration_config", "is", "None", ":", "logger", ".", "error", "(", "'Experiment group `%s` attempt to update iteration, but has n...
Reduce the experiments to restart.
[ "Reduce", "the", "experiments", "to", "restart", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/hpsearch/iteration_managers/hyperband.py#L50-L77
train
Reduce the experiments to restart.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/hpsearch/iteration_managers/hyperband.py
HyperbandIterationManager.reduce_configs
def reduce_configs(self): """Reduce the experiments to restart.""" experiment_ids = self.get_reduced_configs() experiments = self.experiment_group.experiments.filter(id__in=experiment_ids) self.create_iteration() iteration_config = self.experiment_group.iteration_config h...
python
def reduce_configs(self): """Reduce the experiments to restart.""" experiment_ids = self.get_reduced_configs() experiments = self.experiment_group.experiments.filter(id__in=experiment_ids) self.create_iteration() iteration_config = self.experiment_group.iteration_config h...
[ "def", "reduce_configs", "(", "self", ")", ":", "experiment_ids", "=", "self", ".", "get_reduced_configs", "(", ")", "experiments", "=", "self", ".", "experiment_group", ".", "experiments", ".", "filter", "(", "id__in", "=", "experiment_ids", ")", "self", ".",...
Reduce the experiments to restart.
[ "Reduce", "the", "experiments", "to", "restart", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/hpsearch/iteration_managers/hyperband.py#L79-L113
train
Reduce the experiments to restart.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/projects.py
Project.all_experiment_groups
def all_experiment_groups(self): """ Similar to experiment_groups, but uses the default manager to return archived experiments as well. """ from db.models.experiment_groups import ExperimentGroup return ExperimentGroup.all.filter(project=self)
python
def all_experiment_groups(self): """ Similar to experiment_groups, but uses the default manager to return archived experiments as well. """ from db.models.experiment_groups import ExperimentGroup return ExperimentGroup.all.filter(project=self)
[ "def", "all_experiment_groups", "(", "self", ")", ":", "from", "db", ".", "models", ".", "experiment_groups", "import", "ExperimentGroup", "return", "ExperimentGroup", ".", "all", ".", "filter", "(", "project", "=", "self", ")" ]
Similar to experiment_groups, but uses the default manager to return archived experiments as well.
[ "Similar", "to", "experiment_groups", "but", "uses", "the", "default", "manager", "to", "return", "archived", "experiments", "as", "well", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/projects.py#L113-L120
train
Returns a QuerySet of all experiment groups that are associated with this project.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/projects.py
Project.all_jobs
def all_jobs(self): """ Similar to jobs, but uses the default manager to return archived experiments as well. """ from db.models.jobs import Job return Job.all.filter(project=self)
python
def all_jobs(self): """ Similar to jobs, but uses the default manager to return archived experiments as well. """ from db.models.jobs import Job return Job.all.filter(project=self)
[ "def", "all_jobs", "(", "self", ")", ":", "from", "db", ".", "models", ".", "jobs", "import", "Job", "return", "Job", ".", "all", ".", "filter", "(", "project", "=", "self", ")" ]
Similar to jobs, but uses the default manager to return archived experiments as well.
[ "Similar", "to", "jobs", "but", "uses", "the", "default", "manager", "to", "return", "archived", "experiments", "as", "well", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/projects.py#L123-L130
train
Returns a QuerySet of all jobs in this project.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/projects.py
Project.all_build_jobs
def all_build_jobs(self): """ Similar to build_jobs, but uses the default manager to return archived experiments as well. """ from db.models.build_jobs import BuildJob return BuildJob.all.filter(project=self)
python
def all_build_jobs(self): """ Similar to build_jobs, but uses the default manager to return archived experiments as well. """ from db.models.build_jobs import BuildJob return BuildJob.all.filter(project=self)
[ "def", "all_build_jobs", "(", "self", ")", ":", "from", "db", ".", "models", ".", "build_jobs", "import", "BuildJob", "return", "BuildJob", ".", "all", ".", "filter", "(", "project", "=", "self", ")" ]
Similar to build_jobs, but uses the default manager to return archived experiments as well.
[ "Similar", "to", "build_jobs", "but", "uses", "the", "default", "manager", "to", "return", "archived", "experiments", "as", "well", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/projects.py#L133-L140
train
Return all build jobs for this project.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/projects.py
Project.all_notebook_jobs
def all_notebook_jobs(self): """ Similar to notebook_jobs, but uses the default manager to return archived experiments as well. """ from db.models.notebooks import NotebookJob return NotebookJob.all.filter(project=self)
python
def all_notebook_jobs(self): """ Similar to notebook_jobs, but uses the default manager to return archived experiments as well. """ from db.models.notebooks import NotebookJob return NotebookJob.all.filter(project=self)
[ "def", "all_notebook_jobs", "(", "self", ")", ":", "from", "db", ".", "models", ".", "notebooks", "import", "NotebookJob", "return", "NotebookJob", ".", "all", ".", "filter", "(", "project", "=", "self", ")" ]
Similar to notebook_jobs, but uses the default manager to return archived experiments as well.
[ "Similar", "to", "notebook_jobs", "but", "uses", "the", "default", "manager", "to", "return", "archived", "experiments", "as", "well", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/projects.py#L143-L150
train
Returns a QuerySet of all NotebookJob objects for this project.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/projects.py
Project.all_tensorboard_jobs
def all_tensorboard_jobs(self): """ Similar to tensorboard_jobs, but uses the default manager to return archived experiments as well. """ from db.models.tensorboards import TensorboardJob return TensorboardJob.all.filter(project=self)
python
def all_tensorboard_jobs(self): """ Similar to tensorboard_jobs, but uses the default manager to return archived experiments as well. """ from db.models.tensorboards import TensorboardJob return TensorboardJob.all.filter(project=self)
[ "def", "all_tensorboard_jobs", "(", "self", ")", ":", "from", "db", ".", "models", ".", "tensorboards", "import", "TensorboardJob", "return", "TensorboardJob", ".", "all", ".", "filter", "(", "project", "=", "self", ")" ]
Similar to tensorboard_jobs, but uses the default manager to return archived experiments as well.
[ "Similar", "to", "tensorboard_jobs", "but", "uses", "the", "default", "manager", "to", "return", "archived", "experiments", "as", "well", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/projects.py#L153-L160
train
Returns a QuerySet of all TensorboardJob objects for this project.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/experiment_groups.py
ExperimentGroup.all_experiments
def all_experiments(self): """ Similar to experiments, but uses the default manager to return archived experiments as well. """ from db.models.experiments import Experiment return Experiment.all.filter(experiment_group=self)
python
def all_experiments(self): """ Similar to experiments, but uses the default manager to return archived experiments as well. """ from db.models.experiments import Experiment return Experiment.all.filter(experiment_group=self)
[ "def", "all_experiments", "(", "self", ")", ":", "from", "db", ".", "models", ".", "experiments", "import", "Experiment", "return", "Experiment", ".", "all", ".", "filter", "(", "experiment_group", "=", "self", ")" ]
Similar to experiments, but uses the default manager to return archived experiments as well.
[ "Similar", "to", "experiments", "but", "uses", "the", "default", "manager", "to", "return", "archived", "experiments", "as", "well", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/experiment_groups.py#L234-L241
train
Returns a QuerySet of all experiments in this group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/db/models/experiment_groups.py
ExperimentGroup.all_group_experiments
def all_group_experiments(self): """ Similar to group_experiments, but uses the default manager to return archived experiments as well. """ from db.models.experiments import Experiment if self.is_selection: return Experiment.all.filter(selections=self) ...
python
def all_group_experiments(self): """ Similar to group_experiments, but uses the default manager to return archived experiments as well. """ from db.models.experiments import Experiment if self.is_selection: return Experiment.all.filter(selections=self) ...
[ "def", "all_group_experiments", "(", "self", ")", ":", "from", "db", ".", "models", ".", "experiments", "import", "Experiment", "if", "self", ".", "is_selection", ":", "return", "Experiment", ".", "all", ".", "filter", "(", "selections", "=", "self", ")", ...
Similar to group_experiments, but uses the default manager to return archived experiments as well.
[ "Similar", "to", "group_experiments", "but", "uses", "the", "default", "manager", "to", "return", "archived", "experiments", "as", "well", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/db/models/experiment_groups.py#L244-L253
train
Returns all the group experiments.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/pipelines/dags.py
get_dag
def get_dag(nodes, downstream_fn) -> Tuple[Dict, Dict]: """Return a dag representation of the nodes passed. This is equally used for pipelines and pipeline runs. Params: nodes: an instance of `Operation` | `OperationRun` the nodes to represent en dag. downstream_fn: a function that returns...
python
def get_dag(nodes, downstream_fn) -> Tuple[Dict, Dict]: """Return a dag representation of the nodes passed. This is equally used for pipelines and pipeline runs. Params: nodes: an instance of `Operation` | `OperationRun` the nodes to represent en dag. downstream_fn: a function that returns...
[ "def", "get_dag", "(", "nodes", ",", "downstream_fn", ")", "->", "Tuple", "[", "Dict", ",", "Dict", "]", ":", "dag", "=", "{", "}", "node_by_ids", "=", "{", "}", "for", "node", "in", "nodes", ":", "downstream_ops", "=", "downstream_fn", "(", "node", ...
Return a dag representation of the nodes passed. This is equally used for pipelines and pipeline runs. Params: nodes: an instance of `Operation` | `OperationRun` the nodes to represent en dag. downstream_fn: a function that returns the downstream nodes of the a node. Returns: tup...
[ "Return", "a", "dag", "representation", "of", "the", "nodes", "passed", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/pipelines/dags.py#L7-L26
train
Return a dag representation of the nodes passed.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/pipelines/dags.py
get_independent_nodes
def get_independent_nodes(dag): """Get a list of all node in the graph with no dependencies.""" nodes = set(dag.keys()) dependent_nodes = set([node for downstream_nodes in dag.values() for node in downstream_nodes]) return set(nodes - dependent_nodes)
python
def get_independent_nodes(dag): """Get a list of all node in the graph with no dependencies.""" nodes = set(dag.keys()) dependent_nodes = set([node for downstream_nodes in dag.values() for node in downstream_nodes]) return set(nodes - dependent_nodes)
[ "def", "get_independent_nodes", "(", "dag", ")", ":", "nodes", "=", "set", "(", "dag", ".", "keys", "(", ")", ")", "dependent_nodes", "=", "set", "(", "[", "node", "for", "downstream_nodes", "in", "dag", ".", "values", "(", ")", "for", "node", "in", ...
Get a list of all node in the graph with no dependencies.
[ "Get", "a", "list", "of", "all", "node", "in", "the", "graph", "with", "no", "dependencies", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/pipelines/dags.py#L29-L33
train
Get a list of all node in the graph with no dependencies.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/pipelines/dags.py
get_orphan_nodes
def get_orphan_nodes(dag): """Get orphan nodes for given dag.""" independent_nodes = get_independent_nodes(dag) return set([node for node in independent_nodes if not dag[node]])
python
def get_orphan_nodes(dag): """Get orphan nodes for given dag.""" independent_nodes = get_independent_nodes(dag) return set([node for node in independent_nodes if not dag[node]])
[ "def", "get_orphan_nodes", "(", "dag", ")", ":", "independent_nodes", "=", "get_independent_nodes", "(", "dag", ")", "return", "set", "(", "[", "node", "for", "node", "in", "independent_nodes", "if", "not", "dag", "[", "node", "]", "]", ")" ]
Get orphan nodes for given dag.
[ "Get", "orphan", "nodes", "for", "given", "dag", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/pipelines/dags.py#L36-L39
train
Get orphan nodes for given dag.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/pipelines/dags.py
has_dependencies
def has_dependencies(node, dag): """Checks if the node has dependencies.""" for downstream_nodes in dag.values(): if node in downstream_nodes: return True return False
python
def has_dependencies(node, dag): """Checks if the node has dependencies.""" for downstream_nodes in dag.values(): if node in downstream_nodes: return True return False
[ "def", "has_dependencies", "(", "node", ",", "dag", ")", ":", "for", "downstream_nodes", "in", "dag", ".", "values", "(", ")", ":", "if", "node", "in", "downstream_nodes", ":", "return", "True", "return", "False" ]
Checks if the node has dependencies.
[ "Checks", "if", "the", "node", "has", "dependencies", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/pipelines/dags.py#L42-L47
train
Checks if the node has any dependencies.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/pipelines/dags.py
sort_topologically
def sort_topologically(dag): """Sort the dag breath first topologically. Only the nodes inside the dag are returned, i.e. the nodes that are also keys. Returns: a topological ordering of the DAG. Raises: an error if this is not possible (graph is not valid). """ dag = copy.de...
python
def sort_topologically(dag): """Sort the dag breath first topologically. Only the nodes inside the dag are returned, i.e. the nodes that are also keys. Returns: a topological ordering of the DAG. Raises: an error if this is not possible (graph is not valid). """ dag = copy.de...
[ "def", "sort_topologically", "(", "dag", ")", ":", "dag", "=", "copy", ".", "deepcopy", "(", "dag", ")", "sorted_nodes", "=", "[", "]", "independent_nodes", "=", "deque", "(", "get_independent_nodes", "(", "dag", ")", ")", "while", "independent_nodes", ":", ...
Sort the dag breath first topologically. Only the nodes inside the dag are returned, i.e. the nodes that are also keys. Returns: a topological ordering of the DAG. Raises: an error if this is not possible (graph is not valid).
[ "Sort", "the", "dag", "breath", "first", "topologically", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/pipelines/dags.py#L50-L77
train
Sort the dag first topologically.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/query/parser.py
parse_negation_operation
def parse_negation_operation(operation: str) -> Tuple[bool, str]: """Parse the negation modifier in an operation.""" _operation = operation.strip() if not _operation: raise QueryParserException('Operation is not valid: {}'.format(operation)) negation = False if _operation[0] == '~': ...
python
def parse_negation_operation(operation: str) -> Tuple[bool, str]: """Parse the negation modifier in an operation.""" _operation = operation.strip() if not _operation: raise QueryParserException('Operation is not valid: {}'.format(operation)) negation = False if _operation[0] == '~': ...
[ "def", "parse_negation_operation", "(", "operation", ":", "str", ")", "->", "Tuple", "[", "bool", ",", "str", "]", ":", "_operation", "=", "operation", ".", "strip", "(", ")", "if", "not", "_operation", ":", "raise", "QueryParserException", "(", "'Operation ...
Parse the negation modifier in an operation.
[ "Parse", "the", "negation", "modifier", "in", "an", "operation", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/query/parser.py#L13-L23
train
Parse the negation modifier in an operation.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/query/parser.py
parse_comparison_operation
def parse_comparison_operation(operation: str) -> Tuple[Optional[str], str]: """Parse the comparision operator in an operation.""" _operation = operation.strip() if not _operation: raise QueryParserException('Operation is not valid: {}'.format(operation)) # Check inclusion comparison if _ope...
python
def parse_comparison_operation(operation: str) -> Tuple[Optional[str], str]: """Parse the comparision operator in an operation.""" _operation = operation.strip() if not _operation: raise QueryParserException('Operation is not valid: {}'.format(operation)) # Check inclusion comparison if _ope...
[ "def", "parse_comparison_operation", "(", "operation", ":", "str", ")", "->", "Tuple", "[", "Optional", "[", "str", "]", ",", "str", "]", ":", "_operation", "=", "operation", ".", "strip", "(", ")", "if", "not", "_operation", ":", "raise", "QueryParserExce...
Parse the comparision operator in an operation.
[ "Parse", "the", "comparision", "operator", "in", "an", "operation", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/query/parser.py#L26-L42
train
Parse the comparision operator in an operation.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/query/parser.py
parse_datetime_operation
def parse_datetime_operation(operation: str) -> 'QueryOpSpec': """Parse datetime operations. A datetime operation can one of the following: * single value: start_date:2014-10-10, start_date:>2014-10-10, start_date:>=2014-10-10 * negation single value: start_date:~2014-10-10 * interval: start_da...
python
def parse_datetime_operation(operation: str) -> 'QueryOpSpec': """Parse datetime operations. A datetime operation can one of the following: * single value: start_date:2014-10-10, start_date:>2014-10-10, start_date:>=2014-10-10 * negation single value: start_date:~2014-10-10 * interval: start_da...
[ "def", "parse_datetime_operation", "(", "operation", ":", "str", ")", "->", "'QueryOpSpec'", ":", "_operation", "=", "operation", ".", "strip", "(", ")", "if", "not", "_operation", ":", "raise", "QueryParserException", "(", "'Operation is not valid: {}'", ".", "fo...
Parse datetime operations. A datetime operation can one of the following: * single value: start_date:2014-10-10, start_date:>2014-10-10, start_date:>=2014-10-10 * negation single value: start_date:~2014-10-10 * interval: start_date:2010-10-10 10:10 .. 2012-10-10 * negation interval: start_date...
[ "Parse", "datetime", "operations", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/query/parser.py#L45-L88
train
Parse a datetime operation.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/query/parser.py
parse_scalar_operation
def parse_scalar_operation(operation: str) -> 'QueryOpSpec': """Parse scalar operations. A scalar operation can one of the following: * single value: start_date:12, metric1:>0.9, metric1:>=-0.12 * negation single value: metric1:~1112, metric1:~<1112 equivalent to metric1:>=1112 This parser does...
python
def parse_scalar_operation(operation: str) -> 'QueryOpSpec': """Parse scalar operations. A scalar operation can one of the following: * single value: start_date:12, metric1:>0.9, metric1:>=-0.12 * negation single value: metric1:~1112, metric1:~<1112 equivalent to metric1:>=1112 This parser does...
[ "def", "parse_scalar_operation", "(", "operation", ":", "str", ")", "->", "'QueryOpSpec'", ":", "_operation", "=", "operation", ".", "strip", "(", ")", "if", "not", "_operation", ":", "raise", "QueryParserException", "(", "'Operation is not valid: {}'", ".", "form...
Parse scalar operations. A scalar operation can one of the following: * single value: start_date:12, metric1:>0.9, metric1:>=-0.12 * negation single value: metric1:~1112, metric1:~<1112 equivalent to metric1:>=1112 This parser does not allow `|` and `..`.
[ "Parse", "scalar", "operations", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/query/parser.py#L91-L130
train
Parse a scalar operation.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/query/parser.py
parse_expression
def parse_expression(expression: str) -> Tuple[str, str]: """Base parsing for expressions. Every expression must follow a basic format: `name:[modifier|operator]operation[*[operator]operation]` So this parser just split the expression into: field name, operation. """ try: _expressi...
python
def parse_expression(expression: str) -> Tuple[str, str]: """Base parsing for expressions. Every expression must follow a basic format: `name:[modifier|operator]operation[*[operator]operation]` So this parser just split the expression into: field name, operation. """ try: _expressi...
[ "def", "parse_expression", "(", "expression", ":", "str", ")", "->", "Tuple", "[", "str", ",", "str", "]", ":", "try", ":", "_expression", "=", "expression", ".", "strip", "(", ")", "name", ",", "operation", "=", "_expression", ".", "split", "(", "':'"...
Base parsing for expressions. Every expression must follow a basic format: `name:[modifier|operator]operation[*[operator]operation]` So this parser just split the expression into: field name, operation.
[ "Base", "parsing", "for", "expressions", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/query/parser.py#L180-L199
train
Base parsing for expressions.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/query/parser.py
split_query
def split_query(query: str) -> List[str]: """Split a query into different expressions. Example: name:bla, foo:<=1 """ try: _query = query.strip() except (ValueError, AttributeError): raise QueryParserException('query is not valid, received instead {}'.format(query)) exp...
python
def split_query(query: str) -> List[str]: """Split a query into different expressions. Example: name:bla, foo:<=1 """ try: _query = query.strip() except (ValueError, AttributeError): raise QueryParserException('query is not valid, received instead {}'.format(query)) exp...
[ "def", "split_query", "(", "query", ":", "str", ")", "->", "List", "[", "str", "]", ":", "try", ":", "_query", "=", "query", ".", "strip", "(", ")", "except", "(", "ValueError", ",", "AttributeError", ")", ":", "raise", "QueryParserException", "(", "'q...
Split a query into different expressions. Example: name:bla, foo:<=1
[ "Split", "a", "query", "into", "different", "expressions", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/query/parser.py#L202-L218
train
Split a query into different expressions.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/query/parser.py
tokenize_query
def tokenize_query(query: str) -> Dict[str, Iterable]: """Tokenizes a standard search query in name: operations mapping. Example: moo:bla, foo:~<=1, foo:ll..ff { 'moo': ['bla'], 'foo': ['~<=1', 'll..ff'] } """ expressions = split_query(query) name_operat...
python
def tokenize_query(query: str) -> Dict[str, Iterable]: """Tokenizes a standard search query in name: operations mapping. Example: moo:bla, foo:~<=1, foo:ll..ff { 'moo': ['bla'], 'foo': ['~<=1', 'll..ff'] } """ expressions = split_query(query) name_operat...
[ "def", "tokenize_query", "(", "query", ":", "str", ")", "->", "Dict", "[", "str", ",", "Iterable", "]", ":", "expressions", "=", "split_query", "(", "query", ")", "name_operation_tuples", "=", "[", "parse_expression", "(", "expression", ")", "for", "expressi...
Tokenizes a standard search query in name: operations mapping. Example: moo:bla, foo:~<=1, foo:ll..ff { 'moo': ['bla'], 'foo': ['~<=1', 'll..ff'] }
[ "Tokenizes", "a", "standard", "search", "query", "in", "name", ":", "operations", "mapping", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/query/parser.py#L221-L237
train
Tokenizes a standard search query in name and operations mapping.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/query/parser.py
parse_field
def parse_field(field: str) -> Tuple[str, Optional[str]]: """Parses fields with underscores, and return field and suffix. Example: foo => foo, None metric.foo => metric, foo """ _field = field.split('.') _field = [f.strip() for f in _field] if len(_field) == 1 and _field[0]: ...
python
def parse_field(field: str) -> Tuple[str, Optional[str]]: """Parses fields with underscores, and return field and suffix. Example: foo => foo, None metric.foo => metric, foo """ _field = field.split('.') _field = [f.strip() for f in _field] if len(_field) == 1 and _field[0]: ...
[ "def", "parse_field", "(", "field", ":", "str", ")", "->", "Tuple", "[", "str", ",", "Optional", "[", "str", "]", "]", ":", "_field", "=", "field", ".", "split", "(", "'.'", ")", "_field", "=", "[", "f", ".", "strip", "(", ")", "for", "f", "in"...
Parses fields with underscores, and return field and suffix. Example: foo => foo, None metric.foo => metric, foo
[ "Parses", "fields", "with", "underscores", "and", "return", "field", "and", "suffix", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/query/parser.py#L240-L256
train
Parses a single field with underscores and return field and suffix.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/pipelines/utils.py
set_op_upstreams
def set_op_upstreams(op_run, op): """Set the upstream operations for operation run.""" # We get a list of all upstream ops or the current op upstream_ops = op.upstream_operations.values_list('id', flat=True) # We get latest op runs for the upstream_ops latest_op_runs = OperationRun.objects.filter(id...
python
def set_op_upstreams(op_run, op): """Set the upstream operations for operation run.""" # We get a list of all upstream ops or the current op upstream_ops = op.upstream_operations.values_list('id', flat=True) # We get latest op runs for the upstream_ops latest_op_runs = OperationRun.objects.filter(id...
[ "def", "set_op_upstreams", "(", "op_run", ",", "op", ")", ":", "# We get a list of all upstream ops or the current op", "upstream_ops", "=", "op", ".", "upstream_operations", ".", "values_list", "(", "'id'", ",", "flat", "=", "True", ")", "# We get latest op runs for th...
Set the upstream operations for operation run.
[ "Set", "the", "upstream", "operations", "for", "operation", "run", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/pipelines/utils.py#L7-L16
train
Set the upstream operations for an operation run.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/pipelines/utils.py
set_topological_dag_upstreams
def set_topological_dag_upstreams(dag, ops, op_runs, runs_by_ops): """Set the upstream runs for the operation runs in the dag following the topological sort.""" sorted_ops = dags.sort_topologically(dag=dag) for op_id in sorted_ops: op_run_id = runs_by_ops[op_id] op_run = op_runs[op_run_id] ...
python
def set_topological_dag_upstreams(dag, ops, op_runs, runs_by_ops): """Set the upstream runs for the operation runs in the dag following the topological sort.""" sorted_ops = dags.sort_topologically(dag=dag) for op_id in sorted_ops: op_run_id = runs_by_ops[op_id] op_run = op_runs[op_run_id] ...
[ "def", "set_topological_dag_upstreams", "(", "dag", ",", "ops", ",", "op_runs", ",", "runs_by_ops", ")", ":", "sorted_ops", "=", "dags", ".", "sort_topologically", "(", "dag", "=", "dag", ")", "for", "op_id", "in", "sorted_ops", ":", "op_run_id", "=", "runs_...
Set the upstream runs for the operation runs in the dag following the topological sort.
[ "Set", "the", "upstream", "runs", "for", "the", "operation", "runs", "in", "the", "dag", "following", "the", "topological", "sort", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/pipelines/utils.py#L19-L25
train
Set the upstream runs for the operations in the dag following the topological sort.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/pipelines/utils.py
create_pipeline_run
def create_pipeline_run(pipeline, context_by_op): """Create a pipeline run/instance.""" pipeline_run = PipelineRun.objects.create(pipeline=pipeline) dag, ops = pipeline.dag # Go trough the operation and create operation runs and the upstreams op_runs = {} runs_by_ops = {} for op_id in dag.ke...
python
def create_pipeline_run(pipeline, context_by_op): """Create a pipeline run/instance.""" pipeline_run = PipelineRun.objects.create(pipeline=pipeline) dag, ops = pipeline.dag # Go trough the operation and create operation runs and the upstreams op_runs = {} runs_by_ops = {} for op_id in dag.ke...
[ "def", "create_pipeline_run", "(", "pipeline", ",", "context_by_op", ")", ":", "pipeline_run", "=", "PipelineRun", ".", "objects", ".", "create", "(", "pipeline", "=", "pipeline", ")", "dag", ",", "ops", "=", "pipeline", ".", "dag", "# Go trough the operation an...
Create a pipeline run/instance.
[ "Create", "a", "pipeline", "run", "/", "instance", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/pipelines/utils.py#L28-L46
train
Create a pipeline run and instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/k8s_events_handlers/tasks/statuses.py
k8s_events_handle_experiment_job_statuses
def k8s_events_handle_experiment_job_statuses(self: 'celery_app.task', payload: Dict) -> None: """Experiment jobs statuses""" details = payload['details'] job_uuid = details['labels']['job_uuid'] logger.debug('handling events status for job_uuid: %s, status: %s', job_uuid, payload['stat...
python
def k8s_events_handle_experiment_job_statuses(self: 'celery_app.task', payload: Dict) -> None: """Experiment jobs statuses""" details = payload['details'] job_uuid = details['labels']['job_uuid'] logger.debug('handling events status for job_uuid: %s, status: %s', job_uuid, payload['stat...
[ "def", "k8s_events_handle_experiment_job_statuses", "(", "self", ":", "'celery_app.task'", ",", "payload", ":", "Dict", ")", "->", "None", ":", "details", "=", "payload", "[", "'details'", "]", "job_uuid", "=", "details", "[", "'labels'", "]", "[", "'job_uuid'",...
Experiment jobs statuses
[ "Experiment", "jobs", "statuses" ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/k8s_events_handlers/tasks/statuses.py#L30-L64
train
Handle the status of an experiment job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/k8s_events_handlers/tasks/statuses.py
k8s_events_handle_job_statuses
def k8s_events_handle_job_statuses(self: 'celery_app.task', payload: Dict) -> None: """Project jobs statuses""" details = payload['details'] job_uuid = details['labels']['job_uuid'] job_name = details['labels']['job_name'] project_name = details['labels'].get('project_name') logger.debug('handli...
python
def k8s_events_handle_job_statuses(self: 'celery_app.task', payload: Dict) -> None: """Project jobs statuses""" details = payload['details'] job_uuid = details['labels']['job_uuid'] job_name = details['labels']['job_name'] project_name = details['labels'].get('project_name') logger.debug('handli...
[ "def", "k8s_events_handle_job_statuses", "(", "self", ":", "'celery_app.task'", ",", "payload", ":", "Dict", ")", "->", "None", ":", "details", "=", "payload", "[", "'details'", "]", "job_uuid", "=", "details", "[", "'labels'", "]", "[", "'job_uuid'", "]", "...
Project jobs statuses
[ "Project", "jobs", "statuses" ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/k8s_events_handlers/tasks/statuses.py#L71-L100
train
Handle the status of a job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/k8s_events_handlers/tasks/statuses.py
k8s_events_handle_plugin_job_statuses
def k8s_events_handle_plugin_job_statuses(self: 'celery_app.task', payload: Dict) -> None: """Project Plugin jobs statuses""" details = payload['details'] app = details['labels']['app'] job_uuid = details['labels']['job_uuid'] job_name = details['labels']['job_name'] project_name = details['labe...
python
def k8s_events_handle_plugin_job_statuses(self: 'celery_app.task', payload: Dict) -> None: """Project Plugin jobs statuses""" details = payload['details'] app = details['labels']['app'] job_uuid = details['labels']['job_uuid'] job_name = details['labels']['job_name'] project_name = details['labe...
[ "def", "k8s_events_handle_plugin_job_statuses", "(", "self", ":", "'celery_app.task'", ",", "payload", ":", "Dict", ")", "->", "None", ":", "details", "=", "payload", "[", "'details'", "]", "app", "=", "details", "[", "'labels'", "]", "[", "'app'", "]", "job...
Project Plugin jobs statuses
[ "Project", "Plugin", "jobs", "statuses" ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/k8s_events_handlers/tasks/statuses.py#L107-L142
train
Handle the status of a plugin job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/k8s_events_handlers/tasks/statuses.py
k8s_events_handle_build_job_statuses
def k8s_events_handle_build_job_statuses(self: 'celery_app.task', payload: Dict) -> None: """Project Plugin jobs statuses""" details = payload['details'] app = details['labels']['app'] job_uuid = details['labels']['job_uuid'] job_name = details['labels']['job_name'] project_name = details['label...
python
def k8s_events_handle_build_job_statuses(self: 'celery_app.task', payload: Dict) -> None: """Project Plugin jobs statuses""" details = payload['details'] app = details['labels']['app'] job_uuid = details['labels']['job_uuid'] job_name = details['labels']['job_name'] project_name = details['label...
[ "def", "k8s_events_handle_build_job_statuses", "(", "self", ":", "'celery_app.task'", ",", "payload", ":", "Dict", ")", "->", "None", ":", "details", "=", "payload", "[", "'details'", "]", "app", "=", "details", "[", "'labels'", "]", "[", "'app'", "]", "job_...
Project Plugin jobs statuses
[ "Project", "Plugin", "jobs", "statuses" ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/k8s_events_handlers/tasks/statuses.py#L149-L178
train
Handle the build job statuses
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
polyaxon/polyaxon
polyaxon/scheduler/spawners/templates/sidecars.py
get_sidecar_container
def get_sidecar_container(job_container_name, sidecar_container_name, sidecar_docker_image, sidecar_docker_image_pull_policy, namespace, sidecar_config, sidecar_arg...
python
def get_sidecar_container(job_container_name, sidecar_container_name, sidecar_docker_image, sidecar_docker_image_pull_policy, namespace, sidecar_config, sidecar_arg...
[ "def", "get_sidecar_container", "(", "job_container_name", ",", "sidecar_container_name", ",", "sidecar_docker_image", ",", "sidecar_docker_image_pull_policy", ",", "namespace", ",", "sidecar_config", ",", "sidecar_args", ",", "internal_health_check_url", ",", "volume_mounts", ...
Return a pod sidecar container.
[ "Return", "a", "pod", "sidecar", "container", "." ]
e1724f0756b1a42f9e7aa08a976584a84ef7f016
https://github.com/polyaxon/polyaxon/blob/e1724f0756b1a42f9e7aa08a976584a84ef7f016/polyaxon/scheduler/spawners/templates/sidecars.py#L38-L61
train
Return a pod sidecar container.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...