body
stringlengths
26
98.2k
body_hash
int64
-9,222,864,604,528,158,000
9,221,803,474B
docstring
stringlengths
1
16.8k
path
stringlengths
5
230
name
stringlengths
1
96
repository_name
stringlengths
7
89
lang
stringclasses
1 value
body_without_docstring
stringlengths
20
98.2k
def __init__(__self__, *, group_id: Optional[pulumi.Input[str]]=None, users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None): '\n Input properties used for looking up and filtering GroupMemberships resources.\n :param pulumi.Input[str] group_id: ID of a Okta group.\n :param pulumi.Inp...
-1,124,800,230,950,680,700
Input properties used for looking up and filtering GroupMemberships resources. :param pulumi.Input[str] group_id: ID of a Okta group. :param pulumi.Input[Sequence[pulumi.Input[str]]] users: The list of Okta user IDs which the group should have membership managed for.
sdk/python/pulumi_okta/group_memberships.py
__init__
pulumi/pulumi-okta
python
def __init__(__self__, *, group_id: Optional[pulumi.Input[str]]=None, users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None): '\n Input properties used for looking up and filtering GroupMemberships resources.\n :param pulumi.Input[str] group_id: ID of a Okta group.\n :param pulumi.Inp...
@property @pulumi.getter(name='groupId') def group_id(self) -> Optional[pulumi.Input[str]]: '\n ID of a Okta group.\n ' return pulumi.get(self, 'group_id')
-3,177,421,181,971,841,500
ID of a Okta group.
sdk/python/pulumi_okta/group_memberships.py
group_id
pulumi/pulumi-okta
python
@property @pulumi.getter(name='groupId') def group_id(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'group_id')
@property @pulumi.getter def users(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: '\n The list of Okta user IDs which the group should have membership managed for.\n ' return pulumi.get(self, 'users')
99,600,952,663,328,530
The list of Okta user IDs which the group should have membership managed for.
sdk/python/pulumi_okta/group_memberships.py
users
pulumi/pulumi-okta
python
@property @pulumi.getter def users(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: '\n \n ' return pulumi.get(self, 'users')
@overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, group_id: Optional[pulumi.Input[str]]=None, users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, __props__=None): '\n Resource to manage a set of memberships for a specific group.\n\n This res...
-5,755,180,085,078,006,000
Resource to manage a set of memberships for a specific group. This resource will allow you to bulk manage group membership in Okta for a given group. This offers an interface to pass multiple users into a single resource call, for better API resource usage. Effectively this is the same as using the `group.Membership` ...
sdk/python/pulumi_okta/group_memberships.py
__init__
pulumi/pulumi-okta
python
@overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, group_id: Optional[pulumi.Input[str]]=None, users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, __props__=None): '\n Resource to manage a set of memberships for a specific group.\n\n This res...
@overload def __init__(__self__, resource_name: str, args: GroupMembershipsArgs, opts: Optional[pulumi.ResourceOptions]=None): '\n Resource to manage a set of memberships for a specific group.\n\n This resource will allow you to bulk manage group membership in Okta for a given group. This offers an in...
-7,360,302,168,923,495,000
Resource to manage a set of memberships for a specific group. This resource will allow you to bulk manage group membership in Okta for a given group. This offers an interface to pass multiple users into a single resource call, for better API resource usage. Effectively this is the same as using the `group.Membership` ...
sdk/python/pulumi_okta/group_memberships.py
__init__
pulumi/pulumi-okta
python
@overload def __init__(__self__, resource_name: str, args: GroupMembershipsArgs, opts: Optional[pulumi.ResourceOptions]=None): '\n Resource to manage a set of memberships for a specific group.\n\n This resource will allow you to bulk manage group membership in Okta for a given group. This offers an in...
@staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None, group_id: Optional[pulumi.Input[str]]=None, users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None) -> 'GroupMemberships': "\n Get an existing GroupMemberships resource's state with the give...
-1,442,683,605,509,781,800
Get an existing GroupMemberships resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Op...
sdk/python/pulumi_okta/group_memberships.py
get
pulumi/pulumi-okta
python
@staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None, group_id: Optional[pulumi.Input[str]]=None, users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None) -> 'GroupMemberships': "\n Get an existing GroupMemberships resource's state with the give...
@property @pulumi.getter(name='groupId') def group_id(self) -> pulumi.Output[str]: '\n ID of a Okta group.\n ' return pulumi.get(self, 'group_id')
-3,855,980,625,715,913,000
ID of a Okta group.
sdk/python/pulumi_okta/group_memberships.py
group_id
pulumi/pulumi-okta
python
@property @pulumi.getter(name='groupId') def group_id(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'group_id')
@property @pulumi.getter def users(self) -> pulumi.Output[Sequence[str]]: '\n The list of Okta user IDs which the group should have membership managed for.\n ' return pulumi.get(self, 'users')
-9,122,935,689,198,096,000
The list of Okta user IDs which the group should have membership managed for.
sdk/python/pulumi_okta/group_memberships.py
users
pulumi/pulumi-okta
python
@property @pulumi.getter def users(self) -> pulumi.Output[Sequence[str]]: '\n \n ' return pulumi.get(self, 'users')
def build_grid(hyperparameters): 'Build a grid represented as a list of parameter dictionaries.' parameter_dicts = [] for parameters in product(*hyperparameters.values()): parameter_tuples = zip(hyperparameters.keys(), parameters) parameter_dict = dict(parameter_tuples) parameter_dic...
5,178,821,570,779,621,000
Build a grid represented as a list of parameter dictionaries.
autotabular/metalearning/optimizers/optimizer_base.py
build_grid
Fanxingye/Autotabular
python
def build_grid(hyperparameters): parameter_dicts = [] for parameters in product(*hyperparameters.values()): parameter_tuples = zip(hyperparameters.keys(), parameters) parameter_dict = dict(parameter_tuples) parameter_dicts.append(parameter_dict) return parameter_dicts
def test_invalid_unicode_in_build_file(self): 'Demonstrate that unicode characters causing parse errors raise real parse errors.' self.add_to_build_file('BUILD', dedent("\n jvm_binary(name = ‘hello’, # Parse error due to smart quotes (non ascii characters)\n source = 'HelloWorld.java'\n main...
-6,823,476,443,962,574,000
Demonstrate that unicode characters causing parse errors raise real parse errors.
tests/python/pants_test/build_graph/test_build_file_parser.py
test_invalid_unicode_in_build_file
omerzach/pants
python
def test_invalid_unicode_in_build_file(self): self.add_to_build_file('BUILD', dedent("\n jvm_binary(name = ‘hello’, # Parse error due to smart quotes (non ascii characters)\n source = 'HelloWorld.java'\n main = 'foo.HelloWorld',\n )\n ")) build_file = self.create_buildfile('BU...
def test_unicode_string_in_build_file(self): 'Demonstrates that a string containing unicode should work in a BUILD file.' self.add_to_build_file('BUILD', dedent("\n java_library(\n name='foo',\n sources=['א.java']\n )\n ")) build_file = self.create_buildfile('BUILD') ...
-2,613,146,341,876,287,000
Demonstrates that a string containing unicode should work in a BUILD file.
tests/python/pants_test/build_graph/test_build_file_parser.py
test_unicode_string_in_build_file
omerzach/pants
python
def test_unicode_string_in_build_file(self): self.add_to_build_file('BUILD', dedent("\n java_library(\n name='foo',\n sources=['א.java']\n )\n ")) build_file = self.create_buildfile('BUILD') self.build_file_parser.parse_build_file(build_file)
def test_build_file_parser_error_hierarcy(self): 'Exception handling code depends on the fact that all explicit exceptions from BuildFileParser\n are subclassed from the BuildFileParserError base class.\n ' def assert_build_file_parser_error(e): self.assertIsInstance(e, BuildFileParser.BuildFileP...
1,864,469,725,580,416,000
Exception handling code depends on the fact that all explicit exceptions from BuildFileParser are subclassed from the BuildFileParserError base class.
tests/python/pants_test/build_graph/test_build_file_parser.py
test_build_file_parser_error_hierarcy
omerzach/pants
python
def test_build_file_parser_error_hierarcy(self): 'Exception handling code depends on the fact that all explicit exceptions from BuildFileParser\n are subclassed from the BuildFileParserError base class.\n ' def assert_build_file_parser_error(e): self.assertIsInstance(e, BuildFileParser.BuildFileP...
def gen_attributes(rp_attributes): "Generate list of attributes for the API request.\n\n Example of input list:\n ['tag_name:tag_value1', 'tag_value2']\n Output of the function for the given input list:\n [{'key': 'tag_name', 'value': 'tag_value1'}, {'value': 'tag_value2'}]\n\n :param rp_attributes: ...
-4,259,652,237,405,757,000
Generate list of attributes for the API request. Example of input list: ['tag_name:tag_value1', 'tag_value2'] Output of the function for the given input list: [{'key': 'tag_name', 'value': 'tag_value1'}, {'value': 'tag_value2'}] :param rp_attributes: List of attributes(tags) :return: Correctly created li...
reportportal_client/helpers.py
gen_attributes
jyejare/client-Python
python
def gen_attributes(rp_attributes): "Generate list of attributes for the API request.\n\n Example of input list:\n ['tag_name:tag_value1', 'tag_value2']\n Output of the function for the given input list:\n [{'key': 'tag_name', 'value': 'tag_value1'}, {'value': 'tag_value2'}]\n\n :param rp_attributes: ...
def get_launch_sys_attrs(): "Generate attributes for the launch containing system information.\n\n :return: dict {'os': 'Windows',\n 'cpu': 'AMD',\n 'machine': 'Windows10_pc'}\n " return {'os': system(), 'cpu': (processor() or 'unknown'), 'machine': machine(), 'system':...
8,550,479,848,873,520,000
Generate attributes for the launch containing system information. :return: dict {'os': 'Windows', 'cpu': 'AMD', 'machine': 'Windows10_pc'}
reportportal_client/helpers.py
get_launch_sys_attrs
jyejare/client-Python
python
def get_launch_sys_attrs(): "Generate attributes for the launch containing system information.\n\n :return: dict {'os': 'Windows',\n 'cpu': 'AMD',\n 'machine': 'Windows10_pc'}\n " return {'os': system(), 'cpu': (processor() or 'unknown'), 'machine': machine(), 'system':...
def get_package_version(package_name): 'Get version of the given package.\n\n :param package_name: Name of the package\n :return: Version of the package\n ' try: package_version = get_distribution(package_name).version except DistributionNotFound: package_version = 'not ...
1,597,655,982,996,706,800
Get version of the given package. :param package_name: Name of the package :return: Version of the package
reportportal_client/helpers.py
get_package_version
jyejare/client-Python
python
def get_package_version(package_name): 'Get version of the given package.\n\n :param package_name: Name of the package\n :return: Version of the package\n ' try: package_version = get_distribution(package_name).version except DistributionNotFound: package_version = 'not ...
def neighbord_analysis(x_as, column=0): '\n\tGiven an array xas this function compute the distance between the elements the mean distance and the variance\n\t\n\tAuthor: Michele Monti\n\t\n\tArgs:\n\t\t\tx_as: the name of the list or data set that you want:\n\t\n\tKwargs:\n\t\tcolumn: is the column of the data set ...
3,318,488,411,711,542,300
Given an array xas this function compute the distance between the elements the mean distance and the variance Author: Michele Monti Args: x_as: the name of the list or data set that you want: Kwargs: column: is the column of the data set that you need to analyze Returns: mean_distanc...
amolf/numerical_data_analysis/NeighbourAnalysis.py
neighbord_analysis
Repythory/Libraries
python
def neighbord_analysis(x_as, column=0): '\n\tGiven an array xas this function compute the distance between the elements the mean distance and the variance\n\t\n\tAuthor: Michele Monti\n\t\n\tArgs:\n\t\t\tx_as: the name of the list or data set that you want:\n\t\n\tKwargs:\n\t\tcolumn: is the column of the data set ...
def _setup(self): 'Sets up and resets flags before each test.' tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.DEBUG) if (KerasBenchmark.local_flags is None): for flag_method in self.flag_methods: flag_method() flags.FLAGS(['foo']) for (k, v) in self.default_flags...
2,129,715,044,460,102,000
Sets up and resets flags before each test.
official/resnet/keras/keras_benchmark.py
_setup
LinMiaoShuSheng/models
python
def _setup(self): tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.DEBUG) if (KerasBenchmark.local_flags is None): for flag_method in self.flag_methods: flag_method() flags.FLAGS(['foo']) for (k, v) in self.default_flags.items(): setattr(FLAGS, k, v) ...
def _report_benchmark(self, stats, wall_time_sec, top_1_max=None, top_1_min=None, log_steps=None, total_batch_size=None, warmup=1): "Report benchmark results by writing to local protobuf file.\n\n Args:\n stats: dict returned from keras models with known entries.\n wall_time_sec: the during of the benc...
1,068,746,809,112,859,500
Report benchmark results by writing to local protobuf file. Args: stats: dict returned from keras models with known entries. wall_time_sec: the during of the benchmark execution in seconds top_1_max: highest passing level for top_1 accuracy. top_1_min: lowest passing level for top_1 accuracy. log_steps: How ...
official/resnet/keras/keras_benchmark.py
_report_benchmark
LinMiaoShuSheng/models
python
def _report_benchmark(self, stats, wall_time_sec, top_1_max=None, top_1_min=None, log_steps=None, total_batch_size=None, warmup=1): "Report benchmark results by writing to local protobuf file.\n\n Args:\n stats: dict returned from keras models with known entries.\n wall_time_sec: the during of the benc...
def setup_package(): 'Run on testing package.' oauth2client.util.positional_parameters_enforcement = 'EXCEPTION'
7,842,196,517,937,913,000
Run on testing package.
tests/__init__.py
setup_package
1ap/google-api-python-client
python
def setup_package(): oauth2client.util.positional_parameters_enforcement = 'EXCEPTION'
def initialize_flow(self, img): ' Flow is represented as difference between two coordinate grids flow = coords1 - coords0' (N, C, H, W) = img.shape coords0 = coords_grid(N, (H // 8), (W // 8)).to(img.device) coords1 = coords_grid(N, (H // 8), (W // 8)).to(img.device) return (coords0, coords1)
5,953,690,645,597,147,000
Flow is represented as difference between two coordinate grids flow = coords1 - coords0
nets/raft_core/backraft.py
initialize_flow
aharley/track_check_repeat
python
def initialize_flow(self, img): ' ' (N, C, H, W) = img.shape coords0 = coords_grid(N, (H // 8), (W // 8)).to(img.device) coords1 = coords_grid(N, (H // 8), (W // 8)).to(img.device) return (coords0, coords1)
def upsample_flow(self, flow, mask): ' Upsample flow field [H/8, W/8, 2] -> [H, W, 2] using convex combination ' (N, _, H, W) = flow.shape mask = mask.view(N, 1, 9, 8, 8, H, W) mask = torch.softmax(mask, dim=2) up_flow = F.unfold((8 * flow), [3, 3], padding=1) up_flow = up_flow.view(N, 2, 9, 1, ...
5,758,413,022,218,375,000
Upsample flow field [H/8, W/8, 2] -> [H, W, 2] using convex combination
nets/raft_core/backraft.py
upsample_flow
aharley/track_check_repeat
python
def upsample_flow(self, flow, mask): ' ' (N, _, H, W) = flow.shape mask = mask.view(N, 1, 9, 8, 8, H, W) mask = torch.softmax(mask, dim=2) up_flow = F.unfold((8 * flow), [3, 3], padding=1) up_flow = up_flow.view(N, 2, 9, 1, 1, H, W) up_flow = torch.sum((mask * up_flow), dim=2) up_flow =...
def forward(self, image1): ' get featmap for one frame ' image1 = ((2 * (image1 / 255.0)) - 1.0) image1 = image1.contiguous() hdim = self.hidden_dim cdim = self.context_dim with autocast(enabled=self.args.mixed_precision): fmap1 = self.fnet(image1) fmap1 = fmap1.float() return fm...
9,102,215,985,324,929,000
get featmap for one frame
nets/raft_core/backraft.py
forward
aharley/track_check_repeat
python
def forward(self, image1): ' ' image1 = ((2 * (image1 / 255.0)) - 1.0) image1 = image1.contiguous() hdim = self.hidden_dim cdim = self.context_dim with autocast(enabled=self.args.mixed_precision): fmap1 = self.fnet(image1) fmap1 = fmap1.float() return fmap1
def old_forward(self, image1, image2, iters=12, flow_init=None, upsample=True, test_mode=False): ' Estimate optical flow between pair of frames ' image1 = ((2 * (image1 / 255.0)) - 1.0) image2 = ((2 * (image2 / 255.0)) - 1.0) image1 = image1.contiguous() image2 = image2.contiguous() hdim = self....
-4,838,898,532,510,094,000
Estimate optical flow between pair of frames
nets/raft_core/backraft.py
old_forward
aharley/track_check_repeat
python
def old_forward(self, image1, image2, iters=12, flow_init=None, upsample=True, test_mode=False): ' ' image1 = ((2 * (image1 / 255.0)) - 1.0) image2 = ((2 * (image2 / 255.0)) - 1.0) image1 = image1.contiguous() image2 = image2.contiguous() hdim = self.hidden_dim cdim = self.context_dim w...
def start(self, initialization_hook: Optional[Callable[([], None)]]=None): 'Starts the worker group.' self.worker_group = WorkerGroup(self._num_workers, self._num_cpus_per_worker, self._num_gpus_per_worker) if initialization_hook: self.worker_group.execute(initialization_hook) self._backend.on_s...
4,632,527,791,434,311,000
Starts the worker group.
python/ray/util/sgd/v2/backends/backend.py
start
cuongnvan/ray
python
def start(self, initialization_hook: Optional[Callable[([], None)]]=None): self.worker_group = WorkerGroup(self._num_workers, self._num_cpus_per_worker, self._num_gpus_per_worker) if initialization_hook: self.worker_group.execute(initialization_hook) self._backend.on_start(self.worker_group, se...
def start_training(self, train_func: Callable[([], T)]) -> None: 'Executes a training function on all workers in a separate thread.\n\n ``finish_training`` should be called after this.\n\n Args:\n train_func (Callable): The training function to run on each worker.\n ' def initia...
-328,435,917,548,396,860
Executes a training function on all workers in a separate thread. ``finish_training`` should be called after this. Args: train_func (Callable): The training function to run on each worker.
python/ray/util/sgd/v2/backends/backend.py
start_training
cuongnvan/ray
python
def start_training(self, train_func: Callable[([], T)]) -> None: 'Executes a training function on all workers in a separate thread.\n\n ``finish_training`` should be called after this.\n\n Args:\n train_func (Callable): The training function to run on each worker.\n ' def initia...
def fetch_next_result(self) -> Optional[List[Dict]]: 'Fetch next results produced by ``sgd.report()`` from each worker.\n\n Assumes ``start_training`` has already been called.\n\n Returns:\n A list of dictionaries of values passed to ``sgd.report()`` from\n each worker. Each ...
9,198,031,502,204,319,000
Fetch next results produced by ``sgd.report()`` from each worker. Assumes ``start_training`` has already been called. Returns: A list of dictionaries of values passed to ``sgd.report()`` from each worker. Each item corresponds to an intermediate result a single worker. If there are no more items t...
python/ray/util/sgd/v2/backends/backend.py
fetch_next_result
cuongnvan/ray
python
def fetch_next_result(self) -> Optional[List[Dict]]: 'Fetch next results produced by ``sgd.report()`` from each worker.\n\n Assumes ``start_training`` has already been called.\n\n Returns:\n A list of dictionaries of values passed to ``sgd.report()`` from\n each worker. Each ...
def finish_training(self) -> List[T]: 'Finish training and return final results. Propagate any exceptions.\n\n Blocks until training is finished on all workers.\n\n Assumes `start_training` has already been called.\n\n Returns:\n A list of return values from calling ``train_func`` on...
-105,494,462,415,802,850
Finish training and return final results. Propagate any exceptions. Blocks until training is finished on all workers. Assumes `start_training` has already been called. Returns: A list of return values from calling ``train_func`` on each worker. Each item corresponds to the return value from a single work...
python/ray/util/sgd/v2/backends/backend.py
finish_training
cuongnvan/ray
python
def finish_training(self) -> List[T]: 'Finish training and return final results. Propagate any exceptions.\n\n Blocks until training is finished on all workers.\n\n Assumes `start_training` has already been called.\n\n Returns:\n A list of return values from calling ``train_func`` on...
def get_with_failure_handling(self, remote_values): 'Gets the remote values while handling for worker failures.\n\n Args:\n remote_values (list): List of object refs representing functions\n that may fail in the middle of execution. For example, running\n a SGD traini...
-3,861,662,312,918,846,500
Gets the remote values while handling for worker failures. Args: remote_values (list): List of object refs representing functions that may fail in the middle of execution. For example, running a SGD training loop in multiple parallel actor calls. Returns: The resolved objects represented by th...
python/ray/util/sgd/v2/backends/backend.py
get_with_failure_handling
cuongnvan/ray
python
def get_with_failure_handling(self, remote_values): 'Gets the remote values while handling for worker failures.\n\n Args:\n remote_values (list): List of object refs representing functions\n that may fail in the middle of execution. For example, running\n a SGD traini...
def shutdown(self): 'Shuts down the workers in the worker group.' try: self._backend.on_shutdown(self.worker_group, self._backend_config) except RayActorError: logger.warning('Graceful shutdown of backend failed. This is expected if one of the workers has crashed.') self.worker_group.shu...
7,046,521,673,996,014,000
Shuts down the workers in the worker group.
python/ray/util/sgd/v2/backends/backend.py
shutdown
cuongnvan/ray
python
def shutdown(self): try: self._backend.on_shutdown(self.worker_group, self._backend_config) except RayActorError: logger.warning('Graceful shutdown of backend failed. This is expected if one of the workers has crashed.') self.worker_group.shutdown() self.worker_group = InactiveWorke...
def test_create_user(self): '\n Test User model can create a user successfully\n ' self.assertIsInstance(User.objects.create_user(username='username', email='example@example.com', password='password'), User)
-8,015,587,724,313,469,000
Test User model can create a user successfully
authors/apps/authentication/tests/test_create_user.py
test_create_user
andela/ah-bird-box
python
def test_create_user(self): '\n \n ' self.assertIsInstance(User.objects.create_user(username='username', email='example@example.com', password='password'), User)
def test_random_color_py(degrees=(0.1, 1.9), plot=False): '\n Test Python RandomColor\n ' logger.info('Test RandomColor') data = ds.ImageFolderDataset(dataset_dir=DATA_DIR, shuffle=False) transforms_original = mindspore.dataset.transforms.py_transforms.Compose([F.Decode(), F.Resize((224, 224)), F....
-2,311,255,942,487,829,500
Test Python RandomColor
tests/ut/python/dataset/test_random_color.py
test_random_color_py
king4arabs/mindspore
python
def test_random_color_py(degrees=(0.1, 1.9), plot=False): '\n \n ' logger.info('Test RandomColor') data = ds.ImageFolderDataset(dataset_dir=DATA_DIR, shuffle=False) transforms_original = mindspore.dataset.transforms.py_transforms.Compose([F.Decode(), F.Resize((224, 224)), F.ToTensor()]) ds_ori...
def test_random_color_c(degrees=(0.1, 1.9), plot=False, run_golden=True): '\n Test Cpp RandomColor\n ' logger.info('test_random_color_op') original_seed = config_get_set_seed(10) original_num_parallel_workers = config_get_set_num_parallel_workers(1) data1 = ds.TFRecordDataset(C_DATA_DIR, C_SCH...
8,684,165,931,818,608,000
Test Cpp RandomColor
tests/ut/python/dataset/test_random_color.py
test_random_color_c
king4arabs/mindspore
python
def test_random_color_c(degrees=(0.1, 1.9), plot=False, run_golden=True): '\n \n ' logger.info('test_random_color_op') original_seed = config_get_set_seed(10) original_num_parallel_workers = config_get_set_num_parallel_workers(1) data1 = ds.TFRecordDataset(C_DATA_DIR, C_SCHEMA_DIR, columns_lis...
def test_random_color_py_md5(): '\n Test Python RandomColor with md5 check\n ' logger.info('Test RandomColor with md5 check') original_seed = config_get_set_seed(10) original_num_parallel_workers = config_get_set_num_parallel_workers(1) data = ds.ImageFolderDataset(dataset_dir=DATA_DIR, shuffl...
8,487,769,337,350,655,000
Test Python RandomColor with md5 check
tests/ut/python/dataset/test_random_color.py
test_random_color_py_md5
king4arabs/mindspore
python
def test_random_color_py_md5(): '\n \n ' logger.info('Test RandomColor with md5 check') original_seed = config_get_set_seed(10) original_num_parallel_workers = config_get_set_num_parallel_workers(1) data = ds.ImageFolderDataset(dataset_dir=DATA_DIR, shuffle=False) transforms = mindspore.da...
def test_compare_random_color_op(degrees=None, plot=False): '\n Compare Random Color op in Python and Cpp\n ' logger.info('test_random_color_op') original_seed = config_get_set_seed(5) original_num_parallel_workers = config_get_set_num_parallel_workers(1) data1 = ds.TFRecordDataset(C_DATA_DIR,...
-6,266,641,206,013,360,000
Compare Random Color op in Python and Cpp
tests/ut/python/dataset/test_random_color.py
test_compare_random_color_op
king4arabs/mindspore
python
def test_compare_random_color_op(degrees=None, plot=False): '\n \n ' logger.info('test_random_color_op') original_seed = config_get_set_seed(5) original_num_parallel_workers = config_get_set_num_parallel_workers(1) data1 = ds.TFRecordDataset(C_DATA_DIR, C_SCHEMA_DIR, columns_list=['image'], sh...
def test_random_color_c_errors(): '\n Test that Cpp RandomColor errors with bad input\n ' with pytest.raises(TypeError) as error_info: vision.RandomColor(12) assert ('degrees must be either a tuple or a list.' in str(error_info.value)) with pytest.raises(TypeError) as error_info: v...
-8,695,921,805,919,751,000
Test that Cpp RandomColor errors with bad input
tests/ut/python/dataset/test_random_color.py
test_random_color_c_errors
king4arabs/mindspore
python
def test_random_color_c_errors(): '\n \n ' with pytest.raises(TypeError) as error_info: vision.RandomColor(12) assert ('degrees must be either a tuple or a list.' in str(error_info.value)) with pytest.raises(TypeError) as error_info: vision.RandomColor(('col', 3)) assert ("Argu...
def __init__(self, resource_handle, create_op, name): 'Creates a _TreeEnsembleSavable object.\n\n Args:\n resource_handle: handle to the decision tree ensemble variable.\n create_op: the op to initialize the variable.\n name: the name to save the tree ensemble variable under.\n ' (stamp_tok...
-7,466,408,169,068,972,000
Creates a _TreeEnsembleSavable object. Args: resource_handle: handle to the decision tree ensemble variable. create_op: the op to initialize the variable. name: the name to save the tree ensemble variable under.
tensorflow/python/ops/boosted_trees_ops.py
__init__
AnyaTracy/tensorflow
python
def __init__(self, resource_handle, create_op, name): 'Creates a _TreeEnsembleSavable object.\n\n Args:\n resource_handle: handle to the decision tree ensemble variable.\n create_op: the op to initialize the variable.\n name: the name to save the tree ensemble variable under.\n ' (stamp_tok...
def restore(self, restored_tensors, unused_restored_shapes): "Restores the associated tree ensemble from 'restored_tensors'.\n\n Args:\n restored_tensors: the tensors that were loaded from a checkpoint.\n unused_restored_shapes: the shapes this object should conform to after\n restore. Not meani...
4,755,641,117,312,512,000
Restores the associated tree ensemble from 'restored_tensors'. Args: restored_tensors: the tensors that were loaded from a checkpoint. unused_restored_shapes: the shapes this object should conform to after restore. Not meaningful for trees. Returns: The operation that restores the state of the tree ensemble...
tensorflow/python/ops/boosted_trees_ops.py
restore
AnyaTracy/tensorflow
python
def restore(self, restored_tensors, unused_restored_shapes): "Restores the associated tree ensemble from 'restored_tensors'.\n\n Args:\n restored_tensors: the tensors that were loaded from a checkpoint.\n unused_restored_shapes: the shapes this object should conform to after\n restore. Not meani...
def get_stamp_token(self): 'Returns the current stamp token of the resource.' (stamp_token, _, _, _, _) = gen_boosted_trees_ops.boosted_trees_get_ensemble_states(self.resource_handle) return stamp_token
-9,195,282,269,080,987,000
Returns the current stamp token of the resource.
tensorflow/python/ops/boosted_trees_ops.py
get_stamp_token
AnyaTracy/tensorflow
python
def get_stamp_token(self): (stamp_token, _, _, _, _) = gen_boosted_trees_ops.boosted_trees_get_ensemble_states(self.resource_handle) return stamp_token
def get_states(self): 'Returns states of the tree ensemble.\n\n Returns:\n stamp_token, num_trees, num_finalized_trees, num_attempted_layers and\n range of the nodes in the latest layer.\n ' (stamp_token, num_trees, num_finalized_trees, num_attempted_layers, nodes_range) = gen_boosted_trees_ops....
4,252,967,200,812,865,500
Returns states of the tree ensemble. Returns: stamp_token, num_trees, num_finalized_trees, num_attempted_layers and range of the nodes in the latest layer.
tensorflow/python/ops/boosted_trees_ops.py
get_states
AnyaTracy/tensorflow
python
def get_states(self): 'Returns states of the tree ensemble.\n\n Returns:\n stamp_token, num_trees, num_finalized_trees, num_attempted_layers and\n range of the nodes in the latest layer.\n ' (stamp_token, num_trees, num_finalized_trees, num_attempted_layers, nodes_range) = gen_boosted_trees_ops....
def serialize(self): 'Serializes the ensemble into proto and returns the serialized proto.\n\n Returns:\n stamp_token: int64 scalar Tensor to denote the stamp of the resource.\n serialized_proto: string scalar Tensor of the serialized proto.\n ' return gen_boosted_trees_ops.boosted_trees_seriali...
1,912,311,882,728,369
Serializes the ensemble into proto and returns the serialized proto. Returns: stamp_token: int64 scalar Tensor to denote the stamp of the resource. serialized_proto: string scalar Tensor of the serialized proto.
tensorflow/python/ops/boosted_trees_ops.py
serialize
AnyaTracy/tensorflow
python
def serialize(self): 'Serializes the ensemble into proto and returns the serialized proto.\n\n Returns:\n stamp_token: int64 scalar Tensor to denote the stamp of the resource.\n serialized_proto: string scalar Tensor of the serialized proto.\n ' return gen_boosted_trees_ops.boosted_trees_seriali...
def deserialize(self, stamp_token, serialized_proto): 'Deserialize the input proto and resets the ensemble from it.\n\n Args:\n stamp_token: int64 scalar Tensor to denote the stamp of the resource.\n serialized_proto: string scalar Tensor of the serialized proto.\n\n Returns:\n Operation (for d...
660,778,015,599,044,900
Deserialize the input proto and resets the ensemble from it. Args: stamp_token: int64 scalar Tensor to denote the stamp of the resource. serialized_proto: string scalar Tensor of the serialized proto. Returns: Operation (for dependencies).
tensorflow/python/ops/boosted_trees_ops.py
deserialize
AnyaTracy/tensorflow
python
def deserialize(self, stamp_token, serialized_proto): 'Deserialize the input proto and resets the ensemble from it.\n\n Args:\n stamp_token: int64 scalar Tensor to denote the stamp of the resource.\n serialized_proto: string scalar Tensor of the serialized proto.\n\n Returns:\n Operation (for d...
def ZZZ(self): 'hardcoded/mock instance of the class' return CookieContainer()
7,398,721,178,004,803,000
hardcoded/mock instance of the class
release/stubs.min/System/Net/__init___parts/CookieContainer.py
ZZZ
tranconbv/ironpython-stubs
python
def ZZZ(self): return CookieContainer()
def Add(self, *__args): '\n Add(self: CookieContainer,cookie: Cookie)\n\n Adds a System.Net.Cookie to a System.Net.CookieContainer. This method uses the domain from the System.Net.Cookie to determine which domain collection to associate the \n\n System.Net.Cookie with.\n\n \n\n \n\n cookie: The System.Net...
-8,225,875,563,953,717,000
Add(self: CookieContainer,cookie: Cookie) Adds a System.Net.Cookie to a System.Net.CookieContainer. This method uses the domain from the System.Net.Cookie to determine which domain collection to associate the System.Net.Cookie with. cookie: The System.Net.Cookie to be added to the System.Net.CookieContainer...
release/stubs.min/System/Net/__init___parts/CookieContainer.py
Add
tranconbv/ironpython-stubs
python
def Add(self, *__args): '\n Add(self: CookieContainer,cookie: Cookie)\n\n Adds a System.Net.Cookie to a System.Net.CookieContainer. This method uses the domain from the System.Net.Cookie to determine which domain collection to associate the \n\n System.Net.Cookie with.\n\n \n\n \n\n cookie: The System.Net...
def GetCookieHeader(self, uri): '\n GetCookieHeader(self: CookieContainer,uri: Uri) -> str\n\n \n\n Gets the HTTP cookie header that contains the HTTP cookies that represent the System.Net.Cookie instances that are associated with a specific URI.\n\n \n\n uri: The URI of the System.Net.Cookie instances desir...
5,028,364,629,411,337,000
GetCookieHeader(self: CookieContainer,uri: Uri) -> str Gets the HTTP cookie header that contains the HTTP cookies that represent the System.Net.Cookie instances that are associated with a specific URI. uri: The URI of the System.Net.Cookie instances desired. Returns: An HTTP cookie header,with strings represe...
release/stubs.min/System/Net/__init___parts/CookieContainer.py
GetCookieHeader
tranconbv/ironpython-stubs
python
def GetCookieHeader(self, uri): '\n GetCookieHeader(self: CookieContainer,uri: Uri) -> str\n\n \n\n Gets the HTTP cookie header that contains the HTTP cookies that represent the System.Net.Cookie instances that are associated with a specific URI.\n\n \n\n uri: The URI of the System.Net.Cookie instances desir...
def GetCookies(self, uri): '\n GetCookies(self: CookieContainer,uri: Uri) -> CookieCollection\n\n \n\n Gets a System.Net.CookieCollection that contains the System.Net.Cookie instances that are associated with a specific URI.\n\n \n\n uri: The URI of the System.Net.Cookie instances desired.\n\n Returns: A S...
-6,849,928,071,652,846,000
GetCookies(self: CookieContainer,uri: Uri) -> CookieCollection Gets a System.Net.CookieCollection that contains the System.Net.Cookie instances that are associated with a specific URI. uri: The URI of the System.Net.Cookie instances desired. Returns: A System.Net.CookieCollection that contains the System.Net....
release/stubs.min/System/Net/__init___parts/CookieContainer.py
GetCookies
tranconbv/ironpython-stubs
python
def GetCookies(self, uri): '\n GetCookies(self: CookieContainer,uri: Uri) -> CookieCollection\n\n \n\n Gets a System.Net.CookieCollection that contains the System.Net.Cookie instances that are associated with a specific URI.\n\n \n\n uri: The URI of the System.Net.Cookie instances desired.\n\n Returns: A S...
def SetCookies(self, uri, cookieHeader): '\n SetCookies(self: CookieContainer,uri: Uri,cookieHeader: str)\n\n Adds System.Net.Cookie instances for one or more cookies from an HTTP cookie header to the System.Net.CookieContainer for a specific URI.\n\n \n\n uri: The URI of the System.Net.CookieCollection.\n\n ...
767,938,559,518,995,000
SetCookies(self: CookieContainer,uri: Uri,cookieHeader: str) Adds System.Net.Cookie instances for one or more cookies from an HTTP cookie header to the System.Net.CookieContainer for a specific URI. uri: The URI of the System.Net.CookieCollection. cookieHeader: The contents of an HTTP set-cookie header as retur...
release/stubs.min/System/Net/__init___parts/CookieContainer.py
SetCookies
tranconbv/ironpython-stubs
python
def SetCookies(self, uri, cookieHeader): '\n SetCookies(self: CookieContainer,uri: Uri,cookieHeader: str)\n\n Adds System.Net.Cookie instances for one or more cookies from an HTTP cookie header to the System.Net.CookieContainer for a specific URI.\n\n \n\n uri: The URI of the System.Net.CookieCollection.\n\n ...
def __add__(self, *args): ' x.__add__(y) <==> x+yx.__add__(y) <==> x+yx.__add__(y) <==> x+yx.__add__(y) <==> x+y ' pass
-6,471,137,132,733,238,000
x.__add__(y) <==> x+yx.__add__(y) <==> x+yx.__add__(y) <==> x+yx.__add__(y) <==> x+y
release/stubs.min/System/Net/__init___parts/CookieContainer.py
__add__
tranconbv/ironpython-stubs
python
def __add__(self, *args): ' ' pass
@staticmethod def __new__(self, capacity=None, perDomainCapacity=None, maxCookieSize=None): '\n __new__(cls: type)\n\n __new__(cls: type,capacity: int)\n\n __new__(cls: type,capacity: int,perDomainCapacity: int,maxCookieSize: int)\n ' pass
2,610,757,587,463,797,000
__new__(cls: type) __new__(cls: type,capacity: int) __new__(cls: type,capacity: int,perDomainCapacity: int,maxCookieSize: int)
release/stubs.min/System/Net/__init___parts/CookieContainer.py
__new__
tranconbv/ironpython-stubs
python
@staticmethod def __new__(self, capacity=None, perDomainCapacity=None, maxCookieSize=None): '\n __new__(cls: type)\n\n __new__(cls: type,capacity: int)\n\n __new__(cls: type,capacity: int,perDomainCapacity: int,maxCookieSize: int)\n ' pass
@cache_json('cbsa_lookup.json') def cbsa_lookup(): '\n Construct a County->CBSA Lookup table from NBER data\n Returns: dict\n each key is a (State Code, County FIPS code) tuple\n each value is a (CBSA FIPS code, CBSA Name) tuple\n ' logging.info('Beginning CBSA lookup') cbsa_lookup = ...
-8,489,966,963,965,884,000
Construct a County->CBSA Lookup table from NBER data Returns: dict each key is a (State Code, County FIPS code) tuple each value is a (CBSA FIPS code, CBSA Name) tuple
datasets/nber_county_cbsa.py
cbsa_lookup
squatter1/skills-ml
python
@cache_json('cbsa_lookup.json') def cbsa_lookup(): '\n Construct a County->CBSA Lookup table from NBER data\n Returns: dict\n each key is a (State Code, County FIPS code) tuple\n each value is a (CBSA FIPS code, CBSA Name) tuple\n ' logging.info('Beginning CBSA lookup') cbsa_lookup = ...
def gelu(x): "Implementation of the gelu activation function.\n For information: OpenAI GPT's gelu is slightly different (and gives slightly different results):\n 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 * torch.pow(x, 3))))\n Also see https://arxiv.org/abs/1606.08415\n ...
1,420,372,343,885,535,700
Implementation of the gelu activation function. For information: OpenAI GPT's gelu is slightly different (and gives slightly different results): 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 * torch.pow(x, 3)))) Also see https://arxiv.org/abs/1606.08415
models/SketchTransformer/models/networks.py
gelu
avalonstrel/SketchBERT
python
def gelu(x): "Implementation of the gelu activation function.\n For information: OpenAI GPT's gelu is slightly different (and gives slightly different results):\n 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 * torch.pow(x, 3))))\n Also see https://arxiv.org/abs/1606.08415\n ...
def __init__(self, hidden_size, eps=1e-12): '\n Construct a layernorm module in the TF style (epsilon inside the square root).\n ' super(SketchLayerNorm, self).__init__() self.weight = nn.Parameter(torch.ones(hidden_size)) self.bias = nn.Parameter(torch.zeros(hidden_size)) self.varianc...
-8,357,680,159,207,132,000
Construct a layernorm module in the TF style (epsilon inside the square root).
models/SketchTransformer/models/networks.py
__init__
avalonstrel/SketchBERT
python
def __init__(self, hidden_size, eps=1e-12): '\n \n ' super(SketchLayerNorm, self).__init__() self.weight = nn.Parameter(torch.ones(hidden_size)) self.bias = nn.Parameter(torch.zeros(hidden_size)) self.variance_epsilon = eps
def transpose_(self, x): '\n Transpose Function for simplicity.\n ' new_x_shape = (x.size()[:(- 1)] + (self.num_heads, self.head_dim)) x = x.view(*new_x_shape) return x.permute(0, 2, 1, 3)
-6,336,780,184,453,579,000
Transpose Function for simplicity.
models/SketchTransformer/models/networks.py
transpose_
avalonstrel/SketchBERT
python
def transpose_(self, x): '\n \n ' new_x_shape = (x.size()[:(- 1)] + (self.num_heads, self.head_dim)) x = x.view(*new_x_shape) return x.permute(0, 2, 1, 3)
def forward(self, hidden_states, attention_mask, head_mask=None, output_attentions=False, keep_multihead_output=False): '\n Input:\n hidden_states[batch, seq_len, hidden_dim]\n attention_mask[batch, 1, 1, seq_len]\n Output:\n context_states[batch, seq_len, hidden_dim]...
-3,967,524,633,107,120,000
Input: hidden_states[batch, seq_len, hidden_dim] attention_mask[batch, 1, 1, seq_len] Output: context_states[batch, seq_len, hidden_dim] attention_probs[seq_len, hidden_dim]
models/SketchTransformer/models/networks.py
forward
avalonstrel/SketchBERT
python
def forward(self, hidden_states, attention_mask, head_mask=None, output_attentions=False, keep_multihead_output=False): '\n Input:\n hidden_states[batch, seq_len, hidden_dim]\n attention_mask[batch, 1, 1, seq_len]\n Output:\n context_states[batch, seq_len, hidden_dim]...
def get_seg_states(self, hidden_states, segment_index): '\n Input:\n hidden_states[batch, seq_len, hidden_dim]\n segment_index[batch, seq_len]\n ' seg_states = torch.zeros(hidden_states.size(0), self.max_segment, hidden_states.size(2)).to(hidden_states.device) length = (s...
-7,235,732,249,509,121,000
Input: hidden_states[batch, seq_len, hidden_dim] segment_index[batch, seq_len]
models/SketchTransformer/models/networks.py
get_seg_states
avalonstrel/SketchBERT
python
def get_seg_states(self, hidden_states, segment_index): '\n Input:\n hidden_states[batch, seq_len, hidden_dim]\n segment_index[batch, seq_len]\n ' seg_states = torch.zeros(hidden_states.size(0), self.max_segment, hidden_states.size(2)).to(hidden_states.device) length = (s...
def forward(self, hidden_states, attention_mask, segments, segment_index, head_mask=None, output_attentions=False): '\n Input:\n hidden_states[batch, seg_len, hidden_dim]:\n attention_mask[batch, seg_len](segment-based)\n segments[batch, seg_len]:\n segment_index[b...
6,916,960,397,091,090,000
Input: hidden_states[batch, seg_len, hidden_dim]: attention_mask[batch, seg_len](segment-based) segments[batch, seg_len]: segment_index[batch, seq_len]
models/SketchTransformer/models/networks.py
forward
avalonstrel/SketchBERT
python
def forward(self, hidden_states, attention_mask, segments, segment_index, head_mask=None, output_attentions=False): '\n Input:\n hidden_states[batch, seg_len, hidden_dim]:\n attention_mask[batch, seg_len](segment-based)\n segments[batch, seg_len]:\n segment_index[b...
def forward(self, input_states, attention_mask, targets=None, segments=None, head_mask=None, output_all_states=False, output_attentions=False, keep_multihead_output=False): '\n Input:\n input_states[batch, seq_len, 5],\n zs[batch, latent_dim]\n ' if (attention_mask is None): ...
-1,672,195,904,779,026,700
Input: input_states[batch, seq_len, 5], zs[batch, latent_dim]
models/SketchTransformer/models/networks.py
forward
avalonstrel/SketchBERT
python
def forward(self, input_states, attention_mask, targets=None, segments=None, head_mask=None, output_all_states=False, output_attentions=False, keep_multihead_output=False): '\n Input:\n input_states[batch, seq_len, 5],\n zs[batch, latent_dim]\n ' if (attention_mask is None): ...
def forward(self, input_states, zs, attention_mask, targets=None, segments=None, head_mask=None, output_all_states=False, output_attentions=False, keep_multihead_output=False): '\n Input:\n input_states[batch, seq_len, 5],\n zs[batch, latent_dim]\n ' if (attention_mask is Non...
-4,880,509,655,281,427,000
Input: input_states[batch, seq_len, 5], zs[batch, latent_dim]
models/SketchTransformer/models/networks.py
forward
avalonstrel/SketchBERT
python
def forward(self, input_states, zs, attention_mask, targets=None, segments=None, head_mask=None, output_all_states=False, output_attentions=False, keep_multihead_output=False): '\n Input:\n input_states[batch, seq_len, 5],\n zs[batch, latent_dim]\n ' if (attention_mask is Non...
def forward(self, hidden_states): '\n Input:\n hidden_states[batch, seq_len+cls_dim, hidden_dim](0 dim is cls)\n Output:\n x_pred[batch, seq_len+cls_dim, 2*max_size[0]+1]\n y_pred[batch, seq_len+cls_dim, 2*max_size[1]+1]\n type_pred[batch, seq_len+cls_dim, t...
5,573,380,538,648,980,000
Input: hidden_states[batch, seq_len+cls_dim, hidden_dim](0 dim is cls) Output: x_pred[batch, seq_len+cls_dim, 2*max_size[0]+1] y_pred[batch, seq_len+cls_dim, 2*max_size[1]+1] type_pred[batch, seq_len+cls_dim, type_size]
models/SketchTransformer/models/networks.py
forward
avalonstrel/SketchBERT
python
def forward(self, hidden_states): '\n Input:\n hidden_states[batch, seq_len+cls_dim, hidden_dim](0 dim is cls)\n Output:\n x_pred[batch, seq_len+cls_dim, 2*max_size[0]+1]\n y_pred[batch, seq_len+cls_dim, 2*max_size[1]+1]\n type_pred[batch, seq_len+cls_dim, t...
def forward(self, hidden_states, segment_index): '\n Input:\n hidden_states[batch, seg_len, hidden_dim]\n segment_index[batch, seq_len]\n ' seg_states = hidden_states[:, (self.cls_in_input + self.rel_in_input):, :][(segment_index == 0), :] return self.sg_fc(seg_states)
1,118,064,636,496,338,400
Input: hidden_states[batch, seg_len, hidden_dim] segment_index[batch, seq_len]
models/SketchTransformer/models/networks.py
forward
avalonstrel/SketchBERT
python
def forward(self, hidden_states, segment_index): '\n Input:\n hidden_states[batch, seg_len, hidden_dim]\n segment_index[batch, seq_len]\n ' seg_states = hidden_states[:, (self.cls_in_input + self.rel_in_input):, :][(segment_index == 0), :] return self.sg_fc(seg_states)
@property def function_object(self): 'get the generated function object' return self._function
-4,883,460,870,703,305,000
get the generated function object
mlrun/runtimes/function_reference.py
function_object
AlonMaor14/mlrun
python
@property def function_object(self): return self._function
def to_function(self, default_kind=None): 'generate a function object from the ref definitions' if (self.url and ('://' not in self.url)): if (not os.path.isfile(self.url)): raise OSError(f'{self.url} not found') kind = (self.kind or default_kind) if self.url: if (self.url.en...
-1,610,808,312,545,578,200
generate a function object from the ref definitions
mlrun/runtimes/function_reference.py
to_function
AlonMaor14/mlrun
python
def to_function(self, default_kind=None): if (self.url and ('://' not in self.url)): if (not os.path.isfile(self.url)): raise OSError(f'{self.url} not found') kind = (self.kind or default_kind) if self.url: if (self.url.endswith('.yaml') or self.url.startswith('db://') or se...
def deploy(self, **kwargs): 'deploy the function' self._address = self._function.deploy(**kwargs) return self._address
3,107,861,624,235,756,500
deploy the function
mlrun/runtimes/function_reference.py
deploy
AlonMaor14/mlrun
python
def deploy(self, **kwargs): self._address = self._function.deploy(**kwargs) return self._address
def __init__(self, allow_crash_consistent_snapshot=None): 'Constructor for the HypervBackupEnvParams class' self.allow_crash_consistent_snapshot = allow_crash_consistent_snapshot
2,498,918,717,880,499,700
Constructor for the HypervBackupEnvParams class
cohesity_management_sdk/models/hyperv_backup_env_params.py
__init__
anoopbhat/management-sdk-python
python
def __init__(self, allow_crash_consistent_snapshot=None): self.allow_crash_consistent_snapshot = allow_crash_consistent_snapshot
@classmethod def from_dictionary(cls, dictionary): "Creates an instance of this model from a dictionary\n\n Args:\n dictionary (dictionary): A dictionary representation of the object as\n obtained from the deserialization of the server's response. The keys\n MUST match proper...
-3,474,178,223,966,733,300
Creates an instance of this model from a dictionary Args: dictionary (dictionary): A dictionary representation of the object as obtained from the deserialization of the server's response. The keys MUST match property names in the API description. Returns: object: An instance of this structure class.
cohesity_management_sdk/models/hyperv_backup_env_params.py
from_dictionary
anoopbhat/management-sdk-python
python
@classmethod def from_dictionary(cls, dictionary): "Creates an instance of this model from a dictionary\n\n Args:\n dictionary (dictionary): A dictionary representation of the object as\n obtained from the deserialization of the server's response. The keys\n MUST match proper...
@staticmethod def promote_ase_atoms(obj, symmetry=None): ' Convert ASE Atoms object to the one usable by SPRKKR.\n For the case of the usability it is a bit ugly hack: The __class__ attribute\n is replaced so the extra methods and properties of the objects will\n be available.\n\n ...
-8,266,258,733,905,201,000
Convert ASE Atoms object to the one usable by SPRKKR. For the case of the usability it is a bit ugly hack: The __class__ attribute is replaced so the extra methods and properties of the objects will be available. Parameters ---------- obj: ase.Atoms The atoms object to be promoted to be used for SPRKKR calculations ...
src/ase2sprkkr/sprkkr/sprkkr_atoms.py
promote_ase_atoms
ase2sprkkr/ase2sprkkr
python
@staticmethod def promote_ase_atoms(obj, symmetry=None): ' Convert ASE Atoms object to the one usable by SPRKKR.\n For the case of the usability it is a bit ugly hack: The __class__ attribute\n is replaced so the extra methods and properties of the objects will\n be available.\n\n ...
def __init__(self, *args, symmetry=True, potential=None, **kwargs): '\n Creates SPRKKRAtoms atoms\n\n Parameters\n ----------\n *args: list\n The positionals arguments of ase.Atoms.__init__\n symmetry: boolean\n The symmetry will be computed when the sites property wi...
5,208,751,560,967,905,000
Creates SPRKKRAtoms atoms Parameters ---------- *args: list The positionals arguments of ase.Atoms.__init__ symmetry: boolean The symmetry will be computed when the sites property will be initialized. I.e., the by-symmetry-equal atomic sites will share the same sites object. **kwargs: dict The named argume...
src/ase2sprkkr/sprkkr/sprkkr_atoms.py
__init__
ase2sprkkr/ase2sprkkr
python
def __init__(self, *args, symmetry=True, potential=None, **kwargs): '\n Creates SPRKKRAtoms atoms\n\n Parameters\n ----------\n *args: list\n The positionals arguments of ase.Atoms.__init__\n symmetry: boolean\n The symmetry will be computed when the sites property wi...
def _init(self, symmetry=True, potential=None): ' The initialization of the additional (not-in-ASE) properties. To be used\n by constructor and by promote_ase_atoms' self._unique_sites = None self._potential = potential self._symmetry = symmetry
7,673,537,083,973,724,000
The initialization of the additional (not-in-ASE) properties. To be used by constructor and by promote_ase_atoms
src/ase2sprkkr/sprkkr/sprkkr_atoms.py
_init
ase2sprkkr/ase2sprkkr
python
def _init(self, symmetry=True, potential=None): ' The initialization of the additional (not-in-ASE) properties. To be used\n by constructor and by promote_ase_atoms' self._unique_sites = None self._potential = potential self._symmetry = symmetry
@property def symmetry(self): '\n Whether the sites property is/will be generated using symmetry, i.e.\n whether the Sites objects in the sites property will be shared among\n symmetric atomic sites.\n ' return self._symmetry
-7,475,728,776,709,522,000
Whether the sites property is/will be generated using symmetry, i.e. whether the Sites objects in the sites property will be shared among symmetric atomic sites.
src/ase2sprkkr/sprkkr/sprkkr_atoms.py
symmetry
ase2sprkkr/ase2sprkkr
python
@property def symmetry(self): '\n Whether the sites property is/will be generated using symmetry, i.e.\n whether the Sites objects in the sites property will be shared among\n symmetric atomic sites.\n ' return self._symmetry
@symmetry.setter def symmetry(self, value): '\n Recomputes the sites with enabled/disabled symmetry if the value of the property\n has changed.\n ' if (self._symmetry == value): return self._symmetry = value if (self._unique_sites is not None): if value: sel...
4,876,355,944,345,147,000
Recomputes the sites with enabled/disabled symmetry if the value of the property has changed.
src/ase2sprkkr/sprkkr/sprkkr_atoms.py
symmetry
ase2sprkkr/ase2sprkkr
python
@symmetry.setter def symmetry(self, value): '\n Recomputes the sites with enabled/disabled symmetry if the value of the property\n has changed.\n ' if (self._symmetry == value): return self._symmetry = value if (self._unique_sites is not None): if value: sel...
def compute_spacegroup_for_atomic_numbers(self, atomic_numbers=None, symprec=1e-05): " Return spacegroup that suits to the atoms' cell structure and to the given\n atomic_numbers (not necessary the real ones, they can be just ''labels'').\n " atomic_numbers = (atomic_numbers if (atomic_numbers i...
254,699,370,758,858,100
Return spacegroup that suits to the atoms' cell structure and to the given atomic_numbers (not necessary the real ones, they can be just ''labels'').
src/ase2sprkkr/sprkkr/sprkkr_atoms.py
compute_spacegroup_for_atomic_numbers
ase2sprkkr/ase2sprkkr
python
def compute_spacegroup_for_atomic_numbers(self, atomic_numbers=None, symprec=1e-05): " Return spacegroup that suits to the atoms' cell structure and to the given\n atomic_numbers (not necessary the real ones, they can be just labels).\n " atomic_numbers = (atomic_numbers if (atomic_numbers is no...
def compute_sites_symmetry(self, spacegroup=None, atomic_numbers=None, consider_old=False, symprec=1e-05): ' SPRKKR has some properties shared by all by-symmetry-equal sites.\n This method initializes _sites property, that holds these properties:\n makes identical all the atoms on the "symmetry ...
8,060,052,139,602,305,000
SPRKKR has some properties shared by all by-symmetry-equal sites. This method initializes _sites property, that holds these properties: makes identical all the atoms on the "symmetry identical positions" with the same atomic number. The method is called automatically when the sites property is firstly accessed. The ef...
src/ase2sprkkr/sprkkr/sprkkr_atoms.py
compute_sites_symmetry
ase2sprkkr/ase2sprkkr
python
def compute_sites_symmetry(self, spacegroup=None, atomic_numbers=None, consider_old=False, symprec=1e-05): ' SPRKKR has some properties shared by all by-symmetry-equal sites.\n This method initializes _sites property, that holds these properties:\n makes identical all the atoms on the "symmetry ...
def _compute_sites_symmetry(self, spacegroup=None, atomic_numbers=None, consider_old=False, symprec=1e-05): ' See compute_sites_symmetry - this metod does just the same, but it does not set the symmetry property.' occupation = self.info.get('occupancy', {}) if ((not spacegroup) and self._symmetry): ...
-7,394,917,638,340,702,000
See compute_sites_symmetry - this metod does just the same, but it does not set the symmetry property.
src/ase2sprkkr/sprkkr/sprkkr_atoms.py
_compute_sites_symmetry
ase2sprkkr/ase2sprkkr
python
def _compute_sites_symmetry(self, spacegroup=None, atomic_numbers=None, consider_old=False, symprec=1e-05): ' ' occupation = self.info.get('occupancy', {}) if ((not spacegroup) and self._symmetry): if atomic_numbers: mapping = UniqueValuesMapping(atomic_numbers) else: ...
def cancel_sites_symmetry(self): ' Cancel the use of symmetry in the structure, i.e., makes the Site object\n uniqe (not shared) for each atomic site.\n\n Calling this method is nearly equivalent to the setting the symmetry property\n to False, however, this method always recompute the sites ob...
-1,303,938,581,556,577,000
Cancel the use of symmetry in the structure, i.e., makes the Site object uniqe (not shared) for each atomic site. Calling this method is nearly equivalent to the setting the symmetry property to False, however, this method always recompute the sites object, while setting symmetry=False recomputes the sites property on...
src/ase2sprkkr/sprkkr/sprkkr_atoms.py
cancel_sites_symmetry
ase2sprkkr/ase2sprkkr
python
def cancel_sites_symmetry(self): ' Cancel the use of symmetry in the structure, i.e., makes the Site object\n uniqe (not shared) for each atomic site.\n\n Calling this method is nearly equivalent to the setting the symmetry property\n to False, however, this method always recompute the sites ob...
def _cancel_sites_symmetry(self): ' See cancel_sites_symmetry - this metod does just the same, but it does not set the symmetry property.' sites = np.empty(len(self), dtype=object) used = set() occupation = self.info.get('occupancy', {}) for i in range(len(self)): if (self._unique_sites is n...
7,062,645,137,594,079,000
See cancel_sites_symmetry - this metod does just the same, but it does not set the symmetry property.
src/ase2sprkkr/sprkkr/sprkkr_atoms.py
_cancel_sites_symmetry
ase2sprkkr/ase2sprkkr
python
def _cancel_sites_symmetry(self): ' ' sites = np.empty(len(self), dtype=object) used = set() occupation = self.info.get('occupancy', {}) for i in range(len(self)): if (self._unique_sites is not None): site = self._unique_sites[i] if (site in used): sit...
@property def sites(self): ' The sites property holds all the information for the SPR-KKR package:\n atomic types (including number of semicore and valence electrons),\n occupancy, symmetries, meshes...\n Some of the properties are stored in the ASE atoms properties\n (e.g. o...
-5,191,896,333,846,247,000
The sites property holds all the information for the SPR-KKR package: atomic types (including number of semicore and valence electrons), occupancy, symmetries, meshes... Some of the properties are stored in the ASE atoms properties (e.g. occupancy, atomic symbol), however, ASE is not able to hold them all and/or to des...
src/ase2sprkkr/sprkkr/sprkkr_atoms.py
sites
ase2sprkkr/ase2sprkkr
python
@property def sites(self): ' The sites property holds all the information for the SPR-KKR package:\n atomic types (including number of semicore and valence electrons),\n occupancy, symmetries, meshes...\n Some of the properties are stored in the ASE atoms properties\n (e.g. o...
@sites.setter def sites(self, v): ' Set the sites property and update all other dependent\n properties (symbols, occupancy) according to the sites ' an = np.zeros(len(v), dtype=int) occ = {} for (i, j) in enumerate(v): occ[i] = j.occupation.as_dict an[i] = j.occupation.primary_atom...
2,869,206,069,894,840,000
Set the sites property and update all other dependent properties (symbols, occupancy) according to the sites
src/ase2sprkkr/sprkkr/sprkkr_atoms.py
sites
ase2sprkkr/ase2sprkkr
python
@sites.setter def sites(self, v): ' Set the sites property and update all other dependent\n properties (symbols, occupancy) according to the sites ' an = np.zeros(len(v), dtype=int) occ = {} for (i, j) in enumerate(v): occ[i] = j.occupation.as_dict an[i] = j.occupation.primary_atom...
def upload_file_to_shock(self, file_path, token): '\n Use HTTP multi-part POST to save a file to a SHOCK instance.\n ' if (token is None): raise Exception('Authentication token required!') header = {'Authorization': 'Oauth {0}'.format(token)} if (file_path is None): raise E...
-7,824,875,898,772,669,000
Use HTTP multi-part POST to save a file to a SHOCK instance.
lib/kb_SPAdes/kb_SPAdesImpl.py
upload_file_to_shock
mclark58/kb_SPAdes
python
def upload_file_to_shock(self, file_path, token): '\n \n ' if (token is None): raise Exception('Authentication token required!') header = {'Authorization': 'Oauth {0}'.format(token)} if (file_path is None): raise Exception('No file given for upload to SHOCK!') with open...
def run_SPAdes(self, ctx, params): '\n Run SPAdes on paired end libraries\n :param params: instance of type "SPAdesParams" (Input parameters for\n running SPAdes. workspace_name - the name of the workspace from\n which to take input and store output. output_contigset_name - the\n ...
-7,648,011,864,929,356,000
Run SPAdes on paired end libraries :param params: instance of type "SPAdesParams" (Input parameters for running SPAdes. workspace_name - the name of the workspace from which to take input and store output. output_contigset_name - the name of the output contigset read_libraries - a list of Illumina PairedEnd...
lib/kb_SPAdes/kb_SPAdesImpl.py
run_SPAdes
mclark58/kb_SPAdes
python
def run_SPAdes(self, ctx, params): '\n Run SPAdes on paired end libraries\n :param params: instance of type "SPAdesParams" (Input parameters for\n running SPAdes. workspace_name - the name of the workspace from\n which to take input and store output. output_contigset_name - the\n ...
def run_HybridSPAdes(self, ctx, params): '\n Run HybridSPAdes on paired end libraries with PacBio CLR and Oxford Nanopore reads\n :param params: instance of type "HybridSPAdesParams" (------To run\n HybridSPAdes 3.13.0 you need at least one library of the following\n types:------ 1...
-3,089,188,004,854,902,000
Run HybridSPAdes on paired end libraries with PacBio CLR and Oxford Nanopore reads :param params: instance of type "HybridSPAdesParams" (------To run HybridSPAdes 3.13.0 you need at least one library of the following types:------ 1) Illumina paired-end/high-quality mate-pairs/unpaired reads 2) IonTorrent paire...
lib/kb_SPAdes/kb_SPAdesImpl.py
run_HybridSPAdes
mclark58/kb_SPAdes
python
def run_HybridSPAdes(self, ctx, params): '\n Run HybridSPAdes on paired end libraries with PacBio CLR and Oxford Nanopore reads\n :param params: instance of type "HybridSPAdesParams" (------To run\n HybridSPAdes 3.13.0 you need at least one library of the following\n types:------ 1...
def run_metaSPAdes(self, ctx, params): '\n Run SPAdes on paired end libraries for metagenomes\n :param params: instance of type "SPAdesParams" (Input parameters for\n running SPAdes. workspace_name - the name of the workspace from\n which to take input and store output. output_cont...
1,842,031,156,406,198,000
Run SPAdes on paired end libraries for metagenomes :param params: instance of type "SPAdesParams" (Input parameters for running SPAdes. workspace_name - the name of the workspace from which to take input and store output. output_contigset_name - the name of the output contigset read_libraries - a list of Illum...
lib/kb_SPAdes/kb_SPAdesImpl.py
run_metaSPAdes
mclark58/kb_SPAdes
python
def run_metaSPAdes(self, ctx, params): '\n Run SPAdes on paired end libraries for metagenomes\n :param params: instance of type "SPAdesParams" (Input parameters for\n running SPAdes. workspace_name - the name of the workspace from\n which to take input and store output. output_cont...
def init(self, var_list=None, ckpt_dir=None, ckpt_file=None, optimistic=False): '\n :param var_list: vars for restore\n :param ckpt_dir: prefix of model files.\n :param ckpt_file: exact name of model file, priority is higher than `ckpt_dir`\n :param optimistic: only restore weig...
7,315,703,408,418,164,000
:param var_list: vars for restore :param ckpt_dir: prefix of model files. :param ckpt_file: exact name of model file, priority is higher than `ckpt_dir` :param optimistic: only restore weights of same names with model. :return:
tensorkit/restore.py
init
nonu116/HDR-GAN
python
def init(self, var_list=None, ckpt_dir=None, ckpt_file=None, optimistic=False): '\n :param var_list: vars for restore\n :param ckpt_dir: prefix of model files.\n :param ckpt_file: exact name of model file, priority is higher than `ckpt_dir`\n :param optimistic: only restore weig...
def _restore_vars(self, sess): '\n :param sess:\n :return: boolean for successful or not\n ' if (not self._restore_optimistic): if (self.restore_ckpt_file is None): logger.warn(Color.yellow('No checkpoint file for restore vars, checkpoint file is None', bold=True)) ...
-6,708,701,434,879,647,000
:param sess: :return: boolean for successful or not
tensorkit/restore.py
_restore_vars
nonu116/HDR-GAN
python
def _restore_vars(self, sess): '\n :param sess:\n :return: boolean for successful or not\n ' if (not self._restore_optimistic): if (self.restore_ckpt_file is None): logger.warn(Color.yellow('No checkpoint file for restore vars, checkpoint file is None', bold=True)) ...
def _optimistic_restore_model(self, sess): '\n restore weights of same names with model.\n :param sess:\n :return:\n ' if (self.restore_ckpt_file is None): logger.warn(Color.yellow('No ckpt file for restore vars, ckpt file is None')) return False reader = tf.train...
-3,370,335,051,060,885,500
restore weights of same names with model. :param sess: :return:
tensorkit/restore.py
_optimistic_restore_model
nonu116/HDR-GAN
python
def _optimistic_restore_model(self, sess): '\n restore weights of same names with model.\n :param sess:\n :return:\n ' if (self.restore_ckpt_file is None): logger.warn(Color.yellow('No ckpt file for restore vars, ckpt file is None')) return False reader = tf.train...
def _type_repr(obj): 'Return the repr() of an object, special-casing types (internal helper).\n If obj is a type, we return a shorter version than the default\n type.__repr__, based on the module and qualified name, which is\n typically enough to uniquely identify a type. For everything\n else, we fall...
7,618,330,322,038,824,000
Return the repr() of an object, special-casing types (internal helper). If obj is a type, we return a shorter version than the default type.__repr__, based on the module and qualified name, which is typically enough to uniquely identify a type. For everything else, we fall back on repr(obj).
venv/Lib/site-packages/torch/fx/node.py
_type_repr
Westlanderz/AI-Plat1
python
def _type_repr(obj): 'Return the repr() of an object, special-casing types (internal helper).\n If obj is a type, we return a shorter version than the default\n type.__repr__, based on the module and qualified name, which is\n typically enough to uniquely identify a type. For everything\n else, we fall...
@compatibility(is_backward_compatible=True) def map_arg(a: Argument, fn: Callable[([Node], Argument)]) -> Argument: '\n Apply fn to each Node appearing arg. arg may be a list, tuple, slice, or dict with string keys.\n ' assert callable(fn), 'torch.fx.map_arg(a, fn): fn must be a callable' return map_a...
-5,129,645,273,626,015,000
Apply fn to each Node appearing arg. arg may be a list, tuple, slice, or dict with string keys.
venv/Lib/site-packages/torch/fx/node.py
map_arg
Westlanderz/AI-Plat1
python
@compatibility(is_backward_compatible=True) def map_arg(a: Argument, fn: Callable[([Node], Argument)]) -> Argument: '\n \n ' assert callable(fn), 'torch.fx.map_arg(a, fn): fn must be a callable' return map_aggregate(a, (lambda x: (fn(x) if isinstance(x, Node) else x)))
@compatibility(is_backward_compatible=True) def map_aggregate(a: Argument, fn: Callable[([Argument], Argument)]) -> Argument: '\n Apply fn to each Node appearing arg. arg may be a list, tuple, slice, or dict with string keys.\n ' if isinstance(a, tuple): return tuple((map_aggregate(elem, fn) for e...
-8,735,130,783,526,883,000
Apply fn to each Node appearing arg. arg may be a list, tuple, slice, or dict with string keys.
venv/Lib/site-packages/torch/fx/node.py
map_aggregate
Westlanderz/AI-Plat1
python
@compatibility(is_backward_compatible=True) def map_aggregate(a: Argument, fn: Callable[([Argument], Argument)]) -> Argument: '\n \n ' if isinstance(a, tuple): return tuple((map_aggregate(elem, fn) for elem in a)) elif isinstance(a, list): return immutable_list((map_aggregate(elem, fn)...
@compatibility(is_backward_compatible=True) def __init__(self, graph: 'Graph', name: str, op: str, target: 'Target', args: Tuple[('Argument', ...)], kwargs: Dict[(str, 'Argument')], return_type: Optional[Any]=None) -> None: "\n Instantiate an instance of ``Node``. Note: most often, you want to use the\n ...
-269,260,086,734,934,900
Instantiate an instance of ``Node``. Note: most often, you want to use the Graph APIs, i.e. ``Graph.call_module``, ``Graph.call_method``, etc. rather than instantiating a ``Node`` directly. Args: graph (Graph): The ``Graph`` to which this ``Node`` should belong. name (str): The name to which the output of thi...
venv/Lib/site-packages/torch/fx/node.py
__init__
Westlanderz/AI-Plat1
python
@compatibility(is_backward_compatible=True) def __init__(self, graph: 'Graph', name: str, op: str, target: 'Target', args: Tuple[('Argument', ...)], kwargs: Dict[(str, 'Argument')], return_type: Optional[Any]=None) -> None: "\n Instantiate an instance of ``Node``. Note: most often, you want to use the\n ...
@property def next(self) -> 'Node': '\n Returns the next ``Node`` in the linked list of Nodes.\n\n Returns:\n\n The next ``Node`` in the linked list of Nodes.\n ' return self._next
-112,273,230,731,126,510
Returns the next ``Node`` in the linked list of Nodes. Returns: The next ``Node`` in the linked list of Nodes.
venv/Lib/site-packages/torch/fx/node.py
next
Westlanderz/AI-Plat1
python
@property def next(self) -> 'Node': '\n Returns the next ``Node`` in the linked list of Nodes.\n\n Returns:\n\n The next ``Node`` in the linked list of Nodes.\n ' return self._next
@property def prev(self) -> 'Node': '\n Returns the previous ``Node`` in the linked list of Nodes.\n\n Returns:\n\n The previous ``Node`` in the linked list of Nodes.\n ' return self._prev
-7,637,238,228,281,718,000
Returns the previous ``Node`` in the linked list of Nodes. Returns: The previous ``Node`` in the linked list of Nodes.
venv/Lib/site-packages/torch/fx/node.py
prev
Westlanderz/AI-Plat1
python
@property def prev(self) -> 'Node': '\n Returns the previous ``Node`` in the linked list of Nodes.\n\n Returns:\n\n The previous ``Node`` in the linked list of Nodes.\n ' return self._prev
@compatibility(is_backward_compatible=True) def prepend(self, x: 'Node') -> None: '\n Insert x before this node in the list of nodes in the graph. Example::\n\n Before: p -> self\n bx -> x -> ax\n After: p -> x -> self\n bx -> ax\n\n Args:\n...
-7,424,264,496,378,813,000
Insert x before this node in the list of nodes in the graph. Example:: Before: p -> self bx -> x -> ax After: p -> x -> self bx -> ax Args: x (Node): The node to put before this node. Must be a member of the same graph.
venv/Lib/site-packages/torch/fx/node.py
prepend
Westlanderz/AI-Plat1
python
@compatibility(is_backward_compatible=True) def prepend(self, x: 'Node') -> None: '\n Insert x before this node in the list of nodes in the graph. Example::\n\n Before: p -> self\n bx -> x -> ax\n After: p -> x -> self\n bx -> ax\n\n Args:\n...
@compatibility(is_backward_compatible=True) def append(self, x: 'Node') -> None: '\n Insert x after this node in the list of nodes in the graph.\n Equvalent to ``self.next.prepend(x)``\n\n Args:\n x (Node): The node to put after this node. Must be a member of the same graph.\n ...
-1,150,084,651,612,744,200
Insert x after this node in the list of nodes in the graph. Equvalent to ``self.next.prepend(x)`` Args: x (Node): The node to put after this node. Must be a member of the same graph.
venv/Lib/site-packages/torch/fx/node.py
append
Westlanderz/AI-Plat1
python
@compatibility(is_backward_compatible=True) def append(self, x: 'Node') -> None: '\n Insert x after this node in the list of nodes in the graph.\n Equvalent to ``self.next.prepend(x)``\n\n Args:\n x (Node): The node to put after this node. Must be a member of the same graph.\n ...
@property def args(self) -> Tuple[(Argument, ...)]: "\n The tuple of arguments to this ``Node``. The interpretation of arguments\n depends on the node's opcode. See the :class:`Node` docstring for more\n information.\n\n Assignment to this property is allowed. All accounting of uses and ...
3,899,425,412,167,228,400
The tuple of arguments to this ``Node``. The interpretation of arguments depends on the node's opcode. See the :class:`Node` docstring for more information. Assignment to this property is allowed. All accounting of uses and users is updated automatically on assignment.
venv/Lib/site-packages/torch/fx/node.py
args
Westlanderz/AI-Plat1
python
@property def args(self) -> Tuple[(Argument, ...)]: "\n The tuple of arguments to this ``Node``. The interpretation of arguments\n depends on the node's opcode. See the :class:`Node` docstring for more\n information.\n\n Assignment to this property is allowed. All accounting of uses and ...
@args.setter def args(self, a: Tuple[(Argument, ...)]): "\n Set the tuple of arguments to this Node. The interpretation of arguments\n depends on the node's opcode. See the ``fx.Graph`` docstring for more\n information.\n " self.__update_args_kwargs(map_arg(a, (lambda x: x)), self._k...
6,250,060,837,152,039,000
Set the tuple of arguments to this Node. The interpretation of arguments depends on the node's opcode. See the ``fx.Graph`` docstring for more information.
venv/Lib/site-packages/torch/fx/node.py
args
Westlanderz/AI-Plat1
python
@args.setter def args(self, a: Tuple[(Argument, ...)]): "\n Set the tuple of arguments to this Node. The interpretation of arguments\n depends on the node's opcode. See the ``fx.Graph`` docstring for more\n information.\n " self.__update_args_kwargs(map_arg(a, (lambda x: x)), self._k...
@property def kwargs(self) -> Dict[(str, Argument)]: "\n The dict of keyword arguments to this ``Node``. The interpretation of arguments\n depends on the node's opcode. See the :class:`Node` docstring for more\n information.\n\n Assignment to this property is allowed. All accounting of u...
-5,066,895,608,468,566,000
The dict of keyword arguments to this ``Node``. The interpretation of arguments depends on the node's opcode. See the :class:`Node` docstring for more information. Assignment to this property is allowed. All accounting of uses and users is updated automatically on assignment.
venv/Lib/site-packages/torch/fx/node.py
kwargs
Westlanderz/AI-Plat1
python
@property def kwargs(self) -> Dict[(str, Argument)]: "\n The dict of keyword arguments to this ``Node``. The interpretation of arguments\n depends on the node's opcode. See the :class:`Node` docstring for more\n information.\n\n Assignment to this property is allowed. All accounting of u...
@kwargs.setter def kwargs(self, k: Dict[(str, Argument)]): "\n Set the dict of kwargs to this Node. The interpretation of arguments\n depends on the node's opcode. See the ``fx.Graph`` docstring for more\n information.\n " self.__update_args_kwargs(self._args, map_arg(k, (lambda x: x...
-835,094,360,972,673,800
Set the dict of kwargs to this Node. The interpretation of arguments depends on the node's opcode. See the ``fx.Graph`` docstring for more information.
venv/Lib/site-packages/torch/fx/node.py
kwargs
Westlanderz/AI-Plat1
python
@kwargs.setter def kwargs(self, k: Dict[(str, Argument)]): "\n Set the dict of kwargs to this Node. The interpretation of arguments\n depends on the node's opcode. See the ``fx.Graph`` docstring for more\n information.\n " self.__update_args_kwargs(self._args, map_arg(k, (lambda x: x...
@property def all_input_nodes(self) -> List['Node']: '\n Return all Nodes that are inputs to this Node. This is equivalent to\n iterating over ``args`` and ``kwargs`` and only collecting the values that\n are Nodes.\n\n Returns:\n\n List of ``Nodes`` that appear in the ``args`...
-7,689,755,375,074,671,000
Return all Nodes that are inputs to this Node. This is equivalent to iterating over ``args`` and ``kwargs`` and only collecting the values that are Nodes. Returns: List of ``Nodes`` that appear in the ``args`` and ``kwargs`` of this ``Node``, in that order.
venv/Lib/site-packages/torch/fx/node.py
all_input_nodes
Westlanderz/AI-Plat1
python
@property def all_input_nodes(self) -> List['Node']: '\n Return all Nodes that are inputs to this Node. This is equivalent to\n iterating over ``args`` and ``kwargs`` and only collecting the values that\n are Nodes.\n\n Returns:\n\n List of ``Nodes`` that appear in the ``args`...
@compatibility(is_backward_compatible=True) def update_arg(self, idx: int, arg: Argument) -> None: '\n Update an existing positional argument to contain the new value\n ``arg``. After calling, ``self.args[idx] == arg``.\n\n Args:\n\n idx (int): The index into ``self.args`` of the ele...
-6,276,467,114,808,523,000
Update an existing positional argument to contain the new value ``arg``. After calling, ``self.args[idx] == arg``. Args: idx (int): The index into ``self.args`` of the element to update arg (Argument): The new argument value to write into ``args``
venv/Lib/site-packages/torch/fx/node.py
update_arg
Westlanderz/AI-Plat1
python
@compatibility(is_backward_compatible=True) def update_arg(self, idx: int, arg: Argument) -> None: '\n Update an existing positional argument to contain the new value\n ``arg``. After calling, ``self.args[idx] == arg``.\n\n Args:\n\n idx (int): The index into ``self.args`` of the ele...
@compatibility(is_backward_compatible=True) def update_kwarg(self, key: str, arg: Argument) -> None: '\n Update an existing keyword argument to contain the new value\n ``arg``. After calling, ``self.kwargs[key] == arg``.\n\n Args:\n\n key (str): The key in ``self.kwargs`` of the elem...
265,324,208,968,271,550
Update an existing keyword argument to contain the new value ``arg``. After calling, ``self.kwargs[key] == arg``. Args: key (str): The key in ``self.kwargs`` of the element to update arg (Argument): The new argument value to write into ``kwargs``
venv/Lib/site-packages/torch/fx/node.py
update_kwarg
Westlanderz/AI-Plat1
python
@compatibility(is_backward_compatible=True) def update_kwarg(self, key: str, arg: Argument) -> None: '\n Update an existing keyword argument to contain the new value\n ``arg``. After calling, ``self.kwargs[key] == arg``.\n\n Args:\n\n key (str): The key in ``self.kwargs`` of the elem...
@property def stack_trace(self) -> Optional[str]: '\n Return the Python stack trace that was recorded during tracing, if any.\n This property is usually populated by `Tracer.create_proxy`. To record\n stack traces during tracing for debug purposes, set\n `record_stack_traces = True` on t...
-4,988,679,728,696,897,000
Return the Python stack trace that was recorded during tracing, if any. This property is usually populated by `Tracer.create_proxy`. To record stack traces during tracing for debug purposes, set `record_stack_traces = True` on the `Tracer` instance.
venv/Lib/site-packages/torch/fx/node.py
stack_trace
Westlanderz/AI-Plat1
python
@property def stack_trace(self) -> Optional[str]: '\n Return the Python stack trace that was recorded during tracing, if any.\n This property is usually populated by `Tracer.create_proxy`. To record\n stack traces during tracing for debug purposes, set\n `record_stack_traces = True` on t...
def __update_args_kwargs(self, new_args: Tuple[('Argument', ...)], new_kwargs: Dict[(str, 'Argument')]): '\n This API is internal. Do *not* call it directly.\n ' self._args = new_args self._kwargs = new_kwargs for old_use in self._input_nodes.keys(): old_use.users.pop(self) sel...
-4,245,011,480,387,905,500
This API is internal. Do *not* call it directly.
venv/Lib/site-packages/torch/fx/node.py
__update_args_kwargs
Westlanderz/AI-Plat1
python
def __update_args_kwargs(self, new_args: Tuple[('Argument', ...)], new_kwargs: Dict[(str, 'Argument')]): '\n \n ' self._args = new_args self._kwargs = new_kwargs for old_use in self._input_nodes.keys(): old_use.users.pop(self) self._input_nodes = {} map_arg(self._args, (lam...